Better CMake policy detection
- thanks to Rebecca Palmer for suggesting this!
This commit is contained in:
parent
84cbfb2e98
commit
b2ac9982d4
@ -1,10 +1,12 @@
|
|||||||
cmake_minimum_required (VERSION 2.6.4)
|
cmake_minimum_required (VERSION 2.6.4)
|
||||||
|
|
||||||
if(COMMAND cmake_policy)
|
if(COMMAND cmake_policy)
|
||||||
if(${CMAKE_MAJOR_VERSION} GREATER 2) # version 3 or higher
|
if(POLICY CMP0054)
|
||||||
cmake_policy(SET CMP0054 NEW)
|
cmake_policy(SET CMP0054 NEW)
|
||||||
cmake_policy(SET CMP0042 NEW)
|
endif()
|
||||||
endif()
|
if(POLICY CMP0042)
|
||||||
|
cmake_policy(SET CMP0042 NEW)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include (CheckFunctionExists)
|
include (CheckFunctionExists)
|
||||||
|
Loading…
Reference in New Issue
Block a user