diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-01-27 16:09:07 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-01-27 16:09:07 (GMT) |
commit | 25f0b4f397255dfb235d285bd391536a1fe8fe8c (patch) | |
tree | e7e55f6023b96097d3a7d10bdab697a2f4f346ed /CMakeLists.txt | |
parent | 7ac338be9830bdc936b52a4135504ed011418f3c (diff) | |
download | CMake-25f0b4f397255dfb235d285bd391536a1fe8fe8c.zip CMake-25f0b4f397255dfb235d285bd391536a1fe8fe8c.tar.gz CMake-25f0b4f397255dfb235d285bd391536a1fe8fe8c.tar.bz2 |
CMake: add an option to run IWYU in verbose mode
This helps to diagnose places where IWYU asks to include headers for
internal stdlib details.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0485b04..d11b4cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -313,6 +313,11 @@ if(CMake_RUN_IWYU) endif() set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "${IWYU_COMMAND};-Xiwyu;--mapping_file=${CMake_SOURCE_DIR}/Utilities/IWYU/mapping.imp;-w") + option(CMake_IWYU_VERBOSE "Run include-what-you-use in verbose mode" OFF) + if (CMake_IWYU_VERBOSE) + list(APPEND CMAKE_CXX_INCLUDE_WHAT_YOU_USE + -Xiwyu -v7) + endif () list(APPEND CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${CMake_IWYU_OPTIONS}) endif() |