Debian Codegraph @

cmake/Modules/MacroAddCompileFlags.cmake

raw
1 # - MACRO_ADD_COMPILE_FLAGS(target_name flag1 ... flagN)
2
3 # Copyright (c) 2006, Oswald Buddenhagen, <[email protected]>
4 # Copyright (c) 2006, Andreas Schneider, <[email protected]>
5 #
6 # Redistribution and use is allowed according to the terms of the BSD license.
7 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
8
9
10 macro (MACRO_ADD_COMPILE_FLAGS _target)
11
12 get_target_property(_flags ${_target} COMPILE_FLAGS)
13 if (_flags)
14 set(_flags ${_flags} ${ARGN})
15 else (_flags)
16 set(_flags ${ARGN})
17 endif (_flags)
18
19 set_target_properties(${_target} PROPERTIES COMPILE_FLAGS ${_flags})
20
21 endmacro (MACRO_ADD_COMPILE_FLAGS)