From 2d5bdb351557ed1ee51e4026aac26e251045c2a0 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sun, 2 Jun 2019 00:19:42 -0600 Subject: [PATCH] CMake: Fix Interrogate macro's -D flag generator This wraps everything in 'single-quotes' so that defines that contain spaces and/or double-quotes work properly. --- cmake/macros/Interrogate.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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})