#
# General configuration for cmake:
#
+
CMAKE_MINIMUM_REQUIRED(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
+
+IF(POLICY CMP0026)
+ # enable target LOCATION property
+ CMAKE_POLICY(SET CMP0026 OLD)
+ENDIF()
+
+IF(POLICY CMP0037)
+ # allow to override "test" target for quick tests
+ CMAKE_POLICY(SET CMP0037 OLD)
ENDIF()
MESSAGE(STATUS "This is CMake ${CMAKE_VERSION}")
# empty
#
-CMAKE_POLICY(PUSH)
-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)
# Generator specific values:
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake
)
- #
- # In case of the Unix Makefiles generator it is safe to override the
- # default 'help' target, which is - frankly - quite unhelpful.
- #
- IF(CMAKE_GENERATOR MATCHES "Unix Makefiles")
- ADD_CUSTOM_TARGET(help
- COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake
- )
- ENDIF()
-
# Print this message once:
IF(NOT USAGE_PRINTED)
INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake)
ENDMACRO()
-CMAKE_POLICY(POP)
-
# all - compile the library and all enabled components
# clean - remove all generated files
# install - install into CMAKE_INSTALL_PREFIX
-")
-
-IF(CMAKE_GENERATOR MATCHES "Ninja")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_info.cmake
-"# info - print this help message
+# info - print this help message
# help - print a list of valid top level targets
#
-")
-ELSE()
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_info.cmake
-"# info - print this help message in the toplevel directory,
-# otherwise print a list of targets (in subdirectories)
-#
-")
-ENDIF()
-
-FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_info.cmake
-"# edit_cache - run ccmake for changing (cached) configuration variables
+# edit_cache - run ccmake for changing (cached) configuration variables
# and reruns the configure and generate phases of CMake
# rebuild_cache - rerun the configure and generate phases of CMake
#
ADD_CUSTOM_TARGET(info
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_info.cmake
)
-
-#
-# In case of the Unix Makefiles generator it is safe to override the
-# default 'help' target, which is - frankly - quite unhelpful.
-#
-IF(CMAKE_GENERATOR MATCHES "Unix Makefiles")
- ADD_CUSTOM_TARGET(help
- COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_info.cmake
- )
-ENDIF()