Removed use of deprecated cmake policy
This commit is contained in:
parent
01f69e6b10
commit
cf2e3227cc
@ -26,25 +26,10 @@ if(COMMAND cmake_policy)
|
||||
|
||||
# tell CMake to prefer CMake's own CMake modules when available
|
||||
# only available from cmake-2.8.4
|
||||
if(${CMAKE_MAJOR_VERSION} GREATER 2 OR
|
||||
(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 8) OR
|
||||
(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 8 AND ${CMAKE_PATCH_VERSION} GREATER 3))
|
||||
if("${CMAKE_VERSION}" VERSION_GREATER 2.8.3)
|
||||
cmake_policy(SET CMP0017 NEW)
|
||||
endif()
|
||||
|
||||
# cmake-2.6.1 introduces policy cmp0008 decide how to treat full path libraries that do not appear to be valid library file names
|
||||
# quote from cvslog "Such libraries worked by accident in the VS IDE and Xcode generators in CMake 2.4 and below."
|
||||
if(${CMAKE_MAJOR_VERSION} GREATER 2 OR
|
||||
(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 6) OR
|
||||
(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6 AND ${CMAKE_PATCH_VERSION} GREATER 0))
|
||||
cmake_policy(SET CMP0008 OLD)
|
||||
endif()
|
||||
|
||||
# nicer version check - but needs at least CMake 2.6.2? Worth upgrading the requirements?
|
||||
#if("${CMAKE_VERSION}" VERSION_GREATER 2.8.10)
|
||||
# or even easier (available in cmake-2.6)
|
||||
#if(POLICY CMPxyzw)
|
||||
|
||||
endif()
|
||||
|
||||
IF(APPLE)
|
||||
|
Loading…
Reference in New Issue
Block a user