Bug#19001781: ADD SUPPORT FOR CMAKE 3
Set CMP0026 and CMP0045 policies when using CMake version 3 or higher to restore old CMake behavior.
This commit is contained in:
parent
24756e8e3f
commit
6cb3ca5996
@ -25,6 +25,14 @@ IF(CMAKE_VERSION VERSION_EQUAL "2.8.12" OR
|
||||
CMAKE_POLICY(SET CMP0022 OLD)
|
||||
ENDIF()
|
||||
|
||||
# We use the LOCATION target property (CMP0026)
|
||||
# and get_target_property() for non-existent targets (CMP0045)
|
||||
IF(CMAKE_VERSION VERSION_EQUAL "3.0.0" OR
|
||||
CMAKE_VERSION VERSION_GREATER "3.0.0")
|
||||
CMAKE_POLICY(SET CMP0026 OLD)
|
||||
CMAKE_POLICY(SET CMP0045 OLD)
|
||||
ENDIF()
|
||||
|
||||
MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}")
|
||||
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
||||
|
Loading…
x
Reference in New Issue
Block a user