From b276f39ac8186dd2816f016da9f863256e02797e Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 5 Dec 2016 14:04:43 +0100 Subject: [PATCH] Fixed: CMake definitions in PCH --- code/CMakeModules/PCHSupport.cmake | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/code/CMakeModules/PCHSupport.cmake b/code/CMakeModules/PCHSupport.cmake index 45e1aa766..f56626da1 100644 --- a/code/CMakeModules/PCHSupport.cmake +++ b/code/CMakeModules/PCHSupport.cmake @@ -28,15 +28,12 @@ ELSE() ENDIF() MACRO(APPEND_DEFINITION _NAME _VAL) - # value is not empty - IF(${_VAL}) - IF(CMAKE_VERSION VERSION_LESS "2.8.12") - # don't support logical expressions, append definition - LIST(APPEND ${_NAME} "-D${_VAL}") - ELSE() - # support logical expressions, use them - LIST(APPEND ${_NAME} "$<$:-D$>") - ENDIF() + IF(CMAKE_VERSION VERSION_LESS "2.8.12") + # don't support logical expressions, append definition + LIST(APPEND ${_NAME} "-D${_VAL}") + ELSE() + # support logical expressions, use them + LIST(APPEND ${_NAME} "$<$:-D$>") ENDIF() ENDMACRO() @@ -197,7 +194,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target) LIST(APPEND _FLAGS "${item}") ENDFOREACH() ENDIF() - + GET_DIRECTORY_PROPERTY(_DIRECTORY_DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS) IF(_DIRECTORY_DEFINITIONS)