Set CMP0056 if CMake>=3.2

This commit is contained in:
Laurent Rineau 2016-07-27 16:26:55 +02:00
parent 1ec30bd830
commit 4a8602b49e
1 changed files with 11 additions and 0 deletions

View File

@ -27,6 +27,17 @@ if(POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()
if(POLICY CMP0056)
# http://www.cmake.org/cmake/help/v3.2/policy/CMP0056.html
#
# Fix a bug: `try_compile` should use `CMAKE_EXE_LINKER_FLAGS`.
# That variable can contain important flags like
#
# -static-libstdc++ -static-libgcc
#
cmake_policy(SET CMP0056 NEW)
endif()
# Use GNUInstallDirst to get canonical paths
include(GNUInstallDirs)