diff --git a/code/CMakeModules/PCHSupport.cmake b/code/CMakeModules/PCHSupport.cmake index 020fa98d3..50853c964 100644 --- a/code/CMakeModules/PCHSupport.cmake +++ b/code/CMakeModules/PCHSupport.cmake @@ -179,16 +179,18 @@ MACRO(PCH_SET_COMPILE_FLAGS _target) GET_DIRECTORY_PROPERTY(_DIRECTORY_FLAGS DEFINITIONS) IF(_DIRECTORY_FLAGS) + SEPARATE_ARGUMENTS(_DIRECTORY_FLAGS) FOREACH(item ${_DIRECTORY_FLAGS}) - LIST(APPEND _FLAGS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>") + LIST(APPEND _FLAGS "${item}") ENDFOREACH() ENDIF() GET_DIRECTORY_PROPERTY(_DIRECTORY_DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS) IF(_DIRECTORY_DEFINITIONS) + SEPARATE_ARGUMENTS(_DIRECTORY_DEFINITIONS) FOREACH(item ${_DIRECTORY_DEFINITIONS}) - LIST(APPEND _FLAGS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>") + LIST(APPEND _FLAGS "${item}") ENDFOREACH() ENDIF() ENDIF()