diff --git a/cmake/macros/Interrogate.cmake b/cmake/macros/Interrogate.cmake index e6a63c4aff..cdaea1e2a3 100644 --- a/cmake/macros/Interrogate.cmake +++ b/cmake/macros/Interrogate.cmake @@ -209,7 +209,8 @@ function(interrogate_sources target output database language_flags) # Get the compiler definition flags. These must be passed to Interrogate # in the same way that they are passed to the compiler so that Interrogate # will preprocess each file in the same way. - set(define_flags "$$,\t-D>") + set(_compile_defs "$") + set(define_flags "$<$:-D'$'>") # If this is a release build that has NDEBUG defined, we need that too: foreach(build_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE})