diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-11-01 10:30:37 +0100 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-11-01 10:30:37 +0100 |
| commit | bdc26e00ad99f4f670df1a65b5e6439d0dfadc87 (patch) | |
| tree | b0c2f88fa15e2b638121c6b6a2d876bf2bf981b6 /CMakeLists.txt | |
| parent | bc0cc7d5030b80e6dbb05f6a0b49481881bd26c8 (diff) | |
| download | cmix-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.txt | 10 |
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") |
