From 3c908ce10f5bb3f36f1cff870a38e0ba9ee11bbd Mon Sep 17 00:00:00 2001 From: vahrenkamp <vahrenkamp@042f3d55-54a8-47e9-b7fb-15903f145c44> Date: Thu, 28 Nov 2013 09:08:44 +0000 Subject: [PATCH] added cmake version check git-svn-id: http://svn.code.sf.net/p/simox/code/trunk@439 042f3d55-54a8-47e9-b7fb-15903f145c44 --- CMakeLists.txt | 4 +++- VirtualRobot/CMakeLists.txt | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de57f8115..c3b0fa00a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,9 @@ PROJECT(Simox) cmake_minimum_required(VERSION 2.6) -cmake_policy(SET CMP0022 OLD) # avoid INTERFACE_LINK_LIBRARIES warninss +if("${CMAKE_VERSION}" VERSION_GREATER 2.8.11) + cmake_policy(SET CMP0022 OLD) # avoid INTERFACE_LINK_LIBRARIES warninss +ENDIF() MESSAGE(STATUS "******************** Configuring Simox ************************") set (Simox_BUILD_DIRECTORY ${CMAKE_BINARY_DIR} CACHE STRING "Simox build directory") diff --git a/VirtualRobot/CMakeLists.txt b/VirtualRobot/CMakeLists.txt index 2e14d791b..58cd392c2 100644 --- a/VirtualRobot/CMakeLists.txt +++ b/VirtualRobot/CMakeLists.txt @@ -4,7 +4,11 @@ MESSAGE (STATUS "\n ***** CONFIGURING Simox project VirtualRobot *****") CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2) CMAKE_POLICY(VERSION 2.6) -cmake_policy(SET CMP0022 OLD) # avoid INTERFACE_LINK_LIBRARIES warninss + +if("${CMAKE_VERSION}" VERSION_GREATER 2.8.11) + cmake_policy(SET CMP0022 OLD) # avoid INTERFACE_LINK_LIBRARIES warninss +ENDIF() + INCLUDE(config.cmake) -- GitLab