Suppressed some cmake policy warnings

This commit is contained in:
matlabbe 2018-07-30 15:54:01 -04:00
parent 6fa5e0c8f4
commit cb349e557f

View File

@ -26,9 +26,16 @@ INCLUDE(GNUInstallDirs)
####### local cmake modules ####### ####### local cmake modules #######
SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_modules") SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_modules")
if(POLICY CMP0043) # Policy CMP0043 introduced in cmake version 3.0 IGNORES the use of COMPILE_DEFINITIONS suffixed variables, e.g. COMPILE_DEFINITIONS_DEBUG
# Set to OLD behavior until minimum cmake version >= 2.8.10 (version that COMPILE_DEFINITIONS can be set by generator expressions instead)
if (POLICY CMP0043)
cmake_policy(SET CMP0043 OLD) cmake_policy(SET CMP0043 OLD)
endif() endif (POLICY CMP0043)
# Policy CMP0042 introduced in cmake version 3.0 enables the use of @rpath in an install name via MACOSX_RPATH by default
# Set to OLD behavior so that all versions use the same behavior, or until minimum cmake version >= 2.8.12 (version where @rpath is available)
if (POLICY CMP0042)
cmake_policy(SET CMP0042 OLD)
endif (POLICY CMP0042)
####################### #######################
# VERSION # VERSION