build: iwyu CMake script refactored

This commit is contained in:
Mateusz Pusz
2021-05-07 20:46:40 +02:00
parent 2e4b9483fa
commit f4a8a1358e
2 changed files with 47 additions and 43 deletions

View File

@@ -42,7 +42,7 @@ add_compile_definitions($<$<CONFIG:Debug>:gsl_CONFIG_CONTRACT_CHECKING_AUDIT>)
option(UNITS_IWYU "Enables include-what-you-use" OFF)
if(UNITS_IWYU)
include(include-what-you-use)
set_iwyu(
enable_iwyu(
MAPPING_FILE "${PROJECT_SOURCE_DIR}/.mp-units.imp"
NO_FORWARD_DECLARATIONS
QUOTED_INCLUDES_FIRST