Skip to content

Fix setting of cache variables #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 9, 2022
Merged
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
6 changes: 3 additions & 3 deletions tools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ option(CPPCHECK "Turns on cppcheck processing if it is found." OFF)
# as the options set.
macro(clang_tidy)
if(CLANG_TIDY AND CLANG_TIDY_EXE)
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXE} ${ARGN})
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXE} ${ARGN} CACHE STRING "" FORCE)
endif()
endmacro()

# Adds include_what_you_use to the compilation, with the given arguments being
# used as the options set.
macro(include_what_you_use)
if(IWYU AND IWYU_EXE)
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${IWYU_EXE} ${ARGN})
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${IWYU_EXE} ${ARGN} CACHE STRING "" FORCE)
endif()
endmacro()

# Adds cppcheck to the compilation, with the given arguments being used as the
# options set.
macro(cppcheck)
if(CPPCHECK AND CPPCHECK_EXE)
set(CMAKE_CXX_CPPCHECK ${CPPCHECK_EXE} ${ARGN})
set(CMAKE_CXX_CPPCHECK ${CPPCHECK_EXE} ${ARGN} CACHE STRING "" FORCE)
endif()
endmacro()

Expand Down