blob: dab16236d3e9fa4d845c7325d99a8d04120e463d [file] [log] [blame]
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01001# There is no clear way of keeping track of compiler command-line
2# options chosen via `add_definitions', so we need our own method for
3# using it on tools/llvm-config/CMakeLists.txt.
4
5# Beware that there is no implementation of remove_llvm_definitions.
6
7macro(add_llvm_definitions)
8 # We don't want no semicolons on LLVM_DEFINITIONS:
9 foreach(arg ${ARGN})
10 if(DEFINED LLVM_DEFINITIONS)
11 set(LLVM_DEFINITIONS "${LLVM_DEFINITIONS} ${arg}")
12 else()
13 set(LLVM_DEFINITIONS ${arg})
14 endif()
15 endforeach(arg)
16 add_definitions( ${ARGN} )
17endmacro(add_llvm_definitions)