Skip to content

Commit

Permalink
Fixed cppcheck / iwyu macros
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
StableCoder committed Apr 25, 2020
1 parent 3a469d8 commit 6c11e34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2018 by George Cave - [email protected]
# Copyright (C) 2018-2020 by George Cave - [email protected]
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
Expand Down Expand Up @@ -29,15 +29,15 @@ endmacro()
# used as the options set.
macro(include_what_you_use)
if(IWYU AND IWYU_EXE)
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "${IWYU_EXE};${IWYU_STRING}")
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${IWYU_EXE} ${ARGN})
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};${CPPCHECK_STRING}")
set(CMAKE_CXX_CPPCHECK ${CPPCHECK_EXE} ${ARGN})
endif()
endmacro()

Expand Down

0 comments on commit 6c11e34

Please sign in to comment.