Fixed: CMake definitions in PCH

--HG--
branch : develop
feature/pipeline-tools
kervala 8 years ago
parent 6162352d8b
commit 5ee53205b9

@ -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()
@ -197,7 +194,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
LIST(APPEND _FLAGS "${item}") LIST(APPEND _FLAGS "${item}")
ENDFOREACH() ENDFOREACH()
ENDIF() ENDIF()
GET_DIRECTORY_PROPERTY(_DIRECTORY_DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS) GET_DIRECTORY_PROPERTY(_DIRECTORY_DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS)
IF(_DIRECTORY_DEFINITIONS) IF(_DIRECTORY_DEFINITIONS)

Loading…
Cancel
Save