Skip to content

Commit

Permalink
cmake: add include-what-you-use
Browse files Browse the repository at this point in the history
Without using or enforcing it yet.
  • Loading branch information
julianoes committed Mar 1, 2021
1 parent 24b7e9b commit 2c4efde
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/cmake/static_analyzers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,13 @@ if(ENABLE_CLANG_TIDY)
else()
message(SEND_ERROR "clang-tidy requested but executable not found")
endif()
endif()

if(ENABLE_INCLUDE_WHAT_YOU_USE)
find_program(INCLUDE_WHAT_YOU_USE include-what-you-use)
if(INCLUDE_WHAT_YOU_USE)
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${INCLUDE_WHAT_YOU_USE})
else()
message(SEND_ERROR "include-what-you-use requested but executable not found")
endif()
endif()

0 comments on commit 2c4efde

Please sign in to comment.