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
# 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}")
#
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