# empty
#
+CMAKE_POLICY(PUSH)
+CMAKE_POLICY(VERSION 2.8.8)
+
MACRO(DEAL_II_INVOKE_AUTOPILOT)
# Generator specific values:
IF(CMAKE_GENERATOR MATCHES "Ninja")
- #
- # Ninja doesn't like a redefinition of the "help" target, so use "info"
- # in this case...
- #
SET(_make_command "$ ninja")
ELSE()
SET(_make_command " $ make")
#
")
ENDIF()
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake
+ IF(PERL_FOUND)
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake
"# ${_make_command} strip_comments - to strip the source files in this
# directory off the documentation comments
-# ${_make_command} clean - to remove the generated executable as well as
+")
+ ENDIF()
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake
+"# ${_make_command} clean - to remove the generated executable as well as
# all intermediate compilation files
# ${_make_command} runclean - to remove all output generated by the program
# ${_make_command} distclean - to clean the directory from _all_ generated
# files (includes clean, runclean and the removal
# of the generated build system)
+# ${_make_command} info - to view this message again
#
-"
- )
- IF(CMAKE_GENERATOR MATCHES "Ninja")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake
-"# $ ninja info - to view this message again
-"
- )
- ELSE()
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake
-"# $ make help - to view this message again
-" )
- ENDIF()
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake
-"#
# Have a nice day!
#
###\")"
)
- # A custom target to print the message:
ADD_CUSTOM_TARGET(info
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake
)
- IF(NOT CMAKE_GENERATOR MATCHES "Ninja")
+
+ #
+ # 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
)
INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_usage.cmake)
SET(USAGE_PRINTED TRUE CACHE INTERNAL "")
ELSE()
- IF(CMAKE_GENERATOR MATCHES "Ninja")
- MESSAGE(STATUS "Run $ ninja info to print a detailed help message")
- ELSE()
- MESSAGE(STATUS "Run $ make help to print a detailed help message")
- ENDIF()
+ MESSAGE(STATUS "Run ${_make_command} info to print a detailed help message")
ENDIF()
ENDMACRO()
+CMAKE_POLICY(POP)
+
#
# Provide an "info" target to print a help message:
#
-
IF(CMAKE_GENERATOR MATCHES "Ninja")
SET(_make_command "ninja")
ELSE()
SET(_make_command "make")
ENDIF()
+
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_info.cmake
"MESSAGE(
\"###
")
ELSE()
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_info.cmake
-"# help - print this help message in the toplevel directory,
+"# info - print this help message in the toplevel directory,
# otherwise print a list of targets (in subdirectories)
#
")
#
# test - run a minimal set of tests
#
-# setup_tests - set up the testsuite subprojects
-# regen_tests - rerun configure stage in every testsuite subprojects
+# setup_tests - set up testsuite subprojects
+# regen_tests - rerun configure stage in every testsuite subproject
# clean_tests - run the 'clean' target in every testsuite subproject
# prune_tests - remove all testsuite subprojects
#
ADD_CUSTOM_TARGET(info
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_info.cmake
)
-IF(NOT CMAKE_GENERATOR MATCHES "Ninja")
+
+#
+# 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
)