]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Port to version 3.0.0, part 1.
authorMatthias Maier <tamiko@kyomu.43-1.org>
Sun, 22 Jun 2014 20:39:54 +0000 (20:39 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Sun, 22 Jun 2014 20:39:54 +0000 (20:39 +0000)
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

deal.II/CMakeLists.txt
deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake

index 4b0913a50c5bfc3273b4201f0a4c420857a3555d..7c6b8522203128334a248a8b9f0afb70ea32889e 100644 (file)
 # 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}")
 
index 1a07962f5c183739fb1c1972dbee0abb78783b56..8a25b89051fffb5da812dd50c61fbe2efb439ad7 100644 (file)
@@ -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)
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.