cmake test: use policy CMP0020 only if available

Policy CMP0020 was introduced in cmake 2.8.11.
Debian CMake version 2.8.9 is sufficient for building Qt.

See https://github.com/LuaAndC/mxe/commit/6133f6ec74aee1b5fa531782e585710

close #909
This commit is contained in:
Boris Nagaev 2015-10-16 03:39:16 +03:00
parent cea54f1cfa
commit f2496929dc
1 changed files with 3 additions and 1 deletions

View File

@ -9,7 +9,9 @@ project(mxe NONE)
# see cmake --help-policy <cmp> for details
cmake_policy(SET CMP0017 NEW)
cmake_policy(SET CMP0020 NEW)
if (POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
# so we can find pkg-test.cmake files to include
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/../.. ${CMAKE_MODULE_PATH})