diff options
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") |
