--- /dev/null
+This folder contains the deal.II CMake build system
+
+It is structured as follows:
+
+./checks
+========
+
+Contains checks for platform features and compiler bugs and features
+
+./config
+=======
+
+Contains configuration templates for installing deal.IIConfig.cmake and for
+the c++ template expansion mechanism
+
+./configure
+===========
+
+Contains files configure_<feature>.cmake for configuration and setup of
+all features the deal.II library supports
+
+./macros
+========
+
+CMake script macros for several purposes
+
+./modules
+=========
+
+Contains Find<Library>.cmake modules for finding external libraries
+
+./scripts
+=========
+
+Contains script files needed for the build system
+
+
+./setup_*.cmake
+===============
+
+Setup files included by the top level CMakeLists.txt file
)
ENDIF()
-
-###########################################################################
-# #
-# Configure distclean.cmake used by the autopilot 'distclean' target: #
-# #
-###########################################################################
-
-
-IF( "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}" AND
- NOT DISABLE_AUTOPILOT)
- CONFIGURE_FILE(
- ${CMAKE_CURRENT_SOURCE_DIR}/distclean.cmake.in
- ${CMAKE_BINARY_DIR}/distclean.cmake
- @ONLY)
-ENDIF()
-
+++ /dev/null
-SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
-
-#
-# Clean subdirectories from the generated CMake build system:
-#
-FOREACH(_folder bundled config contrib doc include scripts source)
- file(GLOB _files_to_remove
- ${CMAKE_BINARY_DIR}/${_folder}/cmake_install.cmake
- ${CMAKE_BINARY_DIR}/${_folder}/*/cmake_install.cmake
- ${CMAKE_BINARY_DIR}/${_folder}/Makefile
- ${CMAKE_BINARY_DIR}/${_folder}/*/Makefile
- )
- EXECUTE_PROCESS(
- COMMAND ${CMAKE_COMMAND} -E remove ${_files_to_remove}
- )
-
- file(GLOB _directories_to_remove
- ${CMAKE_BINARY_DIR}/${_folder}/CMakeFiles
- ${CMAKE_BINARY_DIR}/${_folder}/*/CMakeFiles
- )
- FOREACH(_dir ${_directories_to_remove})
- EXECUTE_PROCESS(
- COMMAND ${CMAKE_COMMAND} -E remove_directory ${_dir}
- )
- ENDFOREACH()
-ENDFOREACH()
-
-
-#
-# Remove configured files
-#
-file(GLOB _files_to_remove
- ${CMAKE_BINARY_DIR}/CMakeCache.txt
- ${CMAKE_BINARY_DIR}/cmake_install.cmake
- ${CMAKE_BINARY_DIR}/config/deal.IIConfig.cmake
- ${CMAKE_BINARY_DIR}/config/deal.IIConfigVersion.cmake
- ${CMAKE_BINARY_DIR}/config/Make.global_options
- ${CMAKE_BINARY_DIR}/config/template-arguments
- ${CMAKE_BINARY_DIR}/distclean.cmake
- ${CMAKE_BINARY_DIR}/examples/cmake_install.cmake
- ${CMAKE_BINARY_DIR}/examples/Makefile
- ${CMAKE_BINARY_DIR}/include/*/base/config.h
- ${CMAKE_BINARY_DIR}/install_manifest*.txt
- ${CMAKE_BINARY_DIR}/Makefile
- ${CMAKE_BINARY_DIR}/summary.log
- )
-EXECUTE_PROCESS(
- COMMAND ${CMAKE_COMMAND} -E remove ${_files_to_remove}
- )
-
-#
-# and special folders
-#
-file(GLOB _directories_to_remove
- ${CMAKE_BINARY_DIR}/bin
- ${CMAKE_BINARY_DIR}/CMakeFiles
- ${CMAKE_BINARY_DIR}/common
- ${CMAKE_BINARY_DIR}/examples/CMakeFiles
- ${CMAKE_BINARY_DIR}/lib
- )
-FOREACH(_dir ${_directories_to_remove})
- EXECUTE_PROCESS(
- COMMAND ${CMAKE_COMMAND} -E remove_directory ${_dir}
- )
-ENDFOREACH()
-
)
ENDIF()
-
-###########################################################################
-# #
-# Custom targets for the autopilot mode: #
-# #
-###########################################################################
-
-IF( "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}" AND
- NOT DISABLE_AUTOPILOT)
- #
- # Setup the "distclean" target:
- #
- ADD_CUSTOM_TARGET(distclean
- COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean
- COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/distclean.cmake
- )
-
- #
- # Targets for changing the build type:
- #
- ADD_CUSTOM_TARGET(debug
- COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR}
- COMMENT "Switch CMAKE_BUILD_TYPE to Debug"
- )
- ADD_CUSTOM_TARGET(release
- COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR}
- COMMENT "Switch CMAKE_BUILD_TYPE to Release"
- )
- ADD_CUSTOM_TARGET(debugrelease
- COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=DebugRelease ${CMAKE_SOURCE_DIR}
- COMMENT "Switch CMAKE_BUILD_TYPE to DebugRelease"
- )
-
- #
- # A cheesy trick to automatically install and print a summary
- #
- ADD_CUSTOM_TARGET("install-intree" ALL
- COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target install/fast
- )
- ADD_DEPENDENCIES(install-intree compat_files)
- ADD_DEPENDENCIES(install-intree contrib)
- ADD_DEPENDENCIES(install-intree documentation)
- ADD_DEPENDENCIES(install-intree library)
-ENDIF()
-
STRING(REGEX REPLACE "^DEAL_II_WITH_" "" _feature ${_var})
IF(FEATURE_${_feature}_EXTERNAL_CONFIGURED)
FILE(APPEND ${_log} "# ${_var} set up with external dependencies\n")
- LIST(APPEND _features ${_feature})
ELSEIF(FEATURE_${_feature}_BUNDLED_CONFIGURED)
- LIST(APPEND _features ${_feature})
IF(DEAL_II_FORCE_BUNDLED_${_feature})
FILE(APPEND ${_log} "# ${_var} set up with bundled packages (forced)\n")
ELSE()
ENDIF()
ENDFOREACH()
-
-IF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
- TO_STRING(_components ${_components})
- TO_STRING(_features ${_features})
-
- IF(DISABLE_AUTOPILOT)
- FILE(APPEND ${_log} "#\n# Autopilot disabled (DISABLE_AUTOPILOT = ON)\n")
- ELSE()
- FILE(APPEND ${_log}
-"#
-###
-
-###
-#
-# !!! In-source build detected. Activating autopilot. !!!
-# (If you do not want this, configure with DISABLE_AUTOPILOT = ON)
-#
-# deal.II configuration (short summary, for the detailed one see above):
-#
-# CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}
-# CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}
-# CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} on platform ${CMAKE_SYSTEM_NAME}
-# FEATURES: ${_features}
-# COMPONENTS: ${_components}
-#
-# You can now run
-#
-# $ make - to compile and setup the library in-source
-#
-# $ make debug - to switch the build type to \"Debug\"
-# $ make release - to switch the build type to \"Release\"
-# $ make debugrelease - to switch the build type to \"DebugRelease\"
-# $ make edit_cache - to change the configuration (e.g. select or deselect features)
-# and rerun the configure and generate phases of CMake
-#
-# $ make clean - to remove files generated by the build system
-# $ make distclean - to clean the directory from _all_ generated files
-# (\"make clean\" and the removal of the generated build system)
-#
-# Have a nice day!
-")
- ENDIF()
-ENDIF()
-
FILE(APPEND ${_log}
"#\n###"
)