1
0
Fork 0

Cmake policies conditional on Cmake version.

This commit is contained in:
James Turner 2015-02-09 16:42:58 +00:00
parent b8c9cd454e
commit 891c8eaa9f

View file

@ -6,8 +6,10 @@ include (CheckCXXSourceCompiles)
include (CheckIncludeFile)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0054 NEW)
cmake_policy(SET CMP0042 NEW)
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()