aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2016-11-01 10:30:37 +0100
committerDennis Brentjes <d.brentjes@gmail.com>2016-11-01 10:30:37 +0100
commitbdc26e00ad99f4f670df1a65b5e6439d0dfadc87 (patch)
treeb0c2f88fa15e2b638121c6b6a2d876bf2bf981b6 /CMakeLists.txt
parentbc0cc7d5030b80e6dbb05f6a0b49481881bd26c8 (diff)
downloadcmix-bdc26e00ad99f4f670df1a65b5e6439d0dfadc87.tar.gz
cmix-bdc26e00ad99f4f670df1a65b5e6439d0dfadc87.tar.bz2
cmix-bdc26e00ad99f4f670df1a65b5e6439d0dfadc87.zip
Used IWYU to tidy up some inclusions.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f241abd..0d88d63 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,6 +22,16 @@ if(DOXYGEN_FOUND)
)
endif(DOXYGEN_FOUND)
+option(USE_iwyu "Use include-what-you-use to trace unneeded #includes" OFF)
+if(USE_iwyu)
+ find_program(iwyu NAMES include-what-you-use iwyu)
+ if(NOT iwyu)
+ message(FATAL_ERROR "Could not find the program include-what-you-use")
+ else(NOT iwyu)
+ set(iwyu ${iwyu} -Xiwyu --mapping_file=${CMAKE_SOURCE_DIR}/cmix.imp)
+ endif(NOT iwyu)
+endif(USE_iwyu)
+
option(use_lto "Enable link time optimalisation" OFF)
if(use_lto)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto")