Skip to content

Commit 6c11e34

Browse files
committed
Fixed cppcheck / iwyu macros
The macros had not been updated to use given macro arguments as arguments to the application call, and instead still had an older variable in it's place. Rather, it now properly uses $ARGN, which will just copy all given macro arguments and give it to the called program.
1 parent 3a469d8 commit 6c11e34

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2018 by George Cave - [email protected]
2+
# Copyright (C) 2018-2020 by George Cave - [email protected]
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
# use this file except in compliance with the License. You may obtain a copy of
@@ -29,15 +29,15 @@ endmacro()
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};${IWYU_STRING}")
32+
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${IWYU_EXE} ${ARGN})
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};${CPPCHECK_STRING}")
40+
set(CMAKE_CXX_CPPCHECK ${CPPCHECK_EXE} ${ARGN})
4141
endif()
4242
endmacro()
4343

0 commit comments

Comments
 (0)