Cmake policies conditional on Cmake version.
This commit is contained in:
parent
b8c9cd454e
commit
891c8eaa9f
1 changed files with 4 additions and 2 deletions
|
@ -6,8 +6,10 @@ include (CheckCXXSourceCompiles)
|
|||
include (CheckIncludeFile)
|
||||
|
||||
if(COMMAND cmake_policy)
|
||||
if(${CMAKE_MAJOR_VERSION} GREATER 2) # version 3 or higher
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
cmake_policy(SET CMP0042 NEW)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# set this before project()
|
||||
|
|
Loading…
Add table
Reference in a new issue