From: maier Date: Sun, 22 Jun 2014 20:39:54 +0000 (+0000) Subject: CMake: Port to version 3.0.0, part 1. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a49c259c990f3a03829ca745f4f80ef5dd6fceb8;p=dealii-svn.git CMake: Port to version 3.0.0, part 1. This commit sets the following policies to the old behaviour for CMake 3.0.0 or newer: - CMP0026: We query the library target for its name via the LOCATION property. - CMP0037: We override the 'help' targets in case of the Makefile generator. Because we can(tm). git-svn-id: https://svn.dealii.org/trunk@33077 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/CMakeLists.txt b/deal.II/CMakeLists.txt index 4b0913a50c..7c6b852220 100644 --- a/deal.II/CMakeLists.txt +++ b/deal.II/CMakeLists.txt @@ -32,7 +32,10 @@ # General configuration for cmake: # CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) -CMAKE_POLICY(VERSION 2.8.8) +IF(NOT ${CMAKE_VERSION} VERSION_LESS 3.0.0) + CMAKE_POLICY(SET CMP0026 OLD) # enable target LOCATION property + CMAKE_POLICY(SET CMP0037 OLD) # allow to override the generic 'help' target +ENDIF() MESSAGE(STATUS "This is CMake ${CMAKE_VERSION}") diff --git a/deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake b/deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake index 1a07962f5c..8a25b89051 100644 --- a/deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake +++ b/deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake @@ -37,7 +37,9 @@ # CMAKE_POLICY(PUSH) -CMAKE_POLICY(VERSION 2.8.8) +IF(NOT ${CMAKE_VERSION} VERSION_LESS 3.0.0) + CMAKE_POLICY(SET CMP0037 OLD) # allow to override the generic 'help' target +ENDIF() MACRO(DEAL_II_INVOKE_AUTOPILOT)