Fixed: CMake definitions in PCH

This commit is contained in:
kervala 2016-12-05 14:04:43 +01:00
parent 7ad66f8ebd
commit b276f39ac8

View file

@ -28,15 +28,12 @@ ELSE()
ENDIF() ENDIF()
MACRO(APPEND_DEFINITION _NAME _VAL) MACRO(APPEND_DEFINITION _NAME _VAL)
# value is not empty IF(CMAKE_VERSION VERSION_LESS "2.8.12")
IF(${_VAL}) # don't support logical expressions, append definition
IF(CMAKE_VERSION VERSION_LESS "2.8.12") LIST(APPEND ${_NAME} "-D${_VAL}")
# don't support logical expressions, append definition ELSE()
LIST(APPEND ${_NAME} "-D${_VAL}") # support logical expressions, use them
ELSE() LIST(APPEND ${_NAME} "$<$<BOOL:${_VAL}>:-D$<JOIN:${_VAL},-D>>")
# support logical expressions, use them
LIST(APPEND ${_NAME} "$<$<BOOL:${_VAL}>:-D$<JOIN:${_VAL},-D>>")
ENDIF()
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()