mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Fixed: Compilation with old CMake versions
--HG-- branch : develop
This commit is contained in:
parent
c658afdece
commit
6a76fc8317
1 changed files with 15 additions and 4 deletions
|
@ -176,10 +176,21 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(CMAKE_VERSION VERSION_LESS "3.3.0")
|
IF(CMAKE_VERSION VERSION_LESS "3.3.0")
|
||||||
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
|
GET_DIRECTORY_PROPERTY(_DIRECTORY_FLAGS DEFINITIONS)
|
||||||
GET_DIRECTORY_PROPERTY(_directory_definitions DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS)
|
|
||||||
LIST(APPEND _FLAGS ${_directory_flags})
|
IF(_DIRECTORY_FLAGS)
|
||||||
LIST(APPEND _FLAGS ${_directory_definitions})
|
FOREACH(item ${_DIRECTORY_FLAGS})
|
||||||
|
LIST(APPEND _FLAGS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||||
|
ENDFOREACH()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
GET_DIRECTORY_PROPERTY(_DIRECTORY_DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS)
|
||||||
|
|
||||||
|
IF(_DIRECTORY_DEFINITIONS)
|
||||||
|
FOREACH(item ${_DIRECTORY_DEFINITIONS})
|
||||||
|
LIST(APPEND _FLAGS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||||
|
ENDFOREACH()
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Format definitions
|
# Format definitions
|
||||||
|
|
Loading…
Reference in a new issue