Skip to content

Commit e230a36

Browse files
rlalikStableCoder
authored andcommitted
Fix setting of cache variables
Fix for IWYU, cppcheck and clang-tidy
1 parent ed79fb9 commit e230a36

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: tools.cmake

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@ option(CPPCHECK "Turns on cppcheck processing if it is found." OFF)
2121
# as the options set.
2222
macro(clang_tidy)
2323
if(CLANG_TIDY AND CLANG_TIDY_EXE)
24-
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXE} ${ARGN})
24+
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXE} ${ARGN} CACHE STRING "" FORCE)
2525
endif()
2626
endmacro()
2727

2828
# Adds include_what_you_use to the compilation, with the given arguments being
2929
# used as the options set.
3030
macro(include_what_you_use)
3131
if(IWYU AND IWYU_EXE)
32-
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${IWYU_EXE} ${ARGN})
32+
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${IWYU_EXE} ${ARGN} CACHE STRING "" FORCE)
3333
endif()
3434
endmacro()
3535

3636
# Adds cppcheck to the compilation, with the given arguments being used as the
3737
# options set.
3838
macro(cppcheck)
3939
if(CPPCHECK AND CPPCHECK_EXE)
40-
set(CMAKE_CXX_CPPCHECK ${CPPCHECK_EXE} ${ARGN})
40+
set(CMAKE_CXX_CPPCHECK ${CPPCHECK_EXE} ${ARGN} CACHE STRING "" FORCE)
4141
endif()
4242
endmacro()
4343

0 commit comments

Comments
 (0)