Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cmake/find_programs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ endif()
if(NOT TARGET iwyu)
find_program(IWYU_PATH "include-what-you-use")
if(IWYU_PATH)
find_package(PythonInterp)
if(NOT PYTHONINTERP_FOUND)
message(FATAL_ERROR "python is required for include-what-you-use")
find_package(Python COMPONENTS Interpreter)
if(NOT Python_FOUND)
message(FATAL_ERROR "Python is required for include-what-you-use")
endif()
add_custom_target(iwyu
COMMAND "${PYTHON_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/utils/iwyu_tool.py" -p "${CMAKE_BINARY_DIR}" -j ${CMAKE_NUM_PROCESSORS} --
COMMAND "${Python_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/utils/iwyu_tool.py" -p "${CMAKE_BINARY_DIR}" -j ${CMAKE_NUM_PROCESSORS} --
-Xiwyu --no_comments
-Xiwyu --quoted_includes_first
-Xiwyu --cxx17ns
Expand All @@ -86,6 +86,6 @@ if(NOT TARGET iwyu)
if(NOT IWYU_PATH_NOT_FOUND_MESSAGE)
message(STATUS "${BF_COLOR_YLW}unable to locate 'include-what-you-use'${BF_COLOR_RST}")
endif()
SET(IWYU_PATH_NOT_FOUND_MESSAGE ON CACHE BOOL "IWYU not found message" FORCE)
set(IWYU_PATH_NOT_FOUND_MESSAGE ON CACHE BOOL "IWYU not found message" FORCE)
endif()
endif()