From: maier Date: Wed, 31 Oct 2012 09:33:13 +0000 (+0000) Subject: Remove the "autopilot mode" for in-source builds X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e01ee5496041630b2b0c65374bfd64a65adfc7e7;p=dealii-svn.git Remove the "autopilot mode" for in-source builds git-svn-id: https://svn.dealii.org/branches/branch_cmake@27250 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/README.cmake b/deal.II/cmake/README.cmake new file mode 100644 index 0000000000..cac3c5e883 --- /dev/null +++ b/deal.II/cmake/README.cmake @@ -0,0 +1,41 @@ +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_.cmake for configuration and setup of +all features the deal.II library supports + +./macros +======== + +CMake script macros for several purposes + +./modules +========= + +Contains Find.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 diff --git a/deal.II/cmake/config/CMakeLists.txt b/deal.II/cmake/config/CMakeLists.txt index b89c89c9c0..7d7b11b838 100644 --- a/deal.II/cmake/config/CMakeLists.txt +++ b/deal.II/cmake/config/CMakeLists.txt @@ -197,19 +197,3 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES) ) 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() - diff --git a/deal.II/cmake/config/distclean.cmake.in b/deal.II/cmake/config/distclean.cmake.in deleted file mode 100644 index 0057d6a042..0000000000 --- a/deal.II/cmake/config/distclean.cmake.in +++ /dev/null @@ -1,66 +0,0 @@ -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() - diff --git a/deal.II/cmake/setup_custom_targets.cmake b/deal.II/cmake/setup_custom_targets.cmake index cab4fcf78e..ea8431f418 100644 --- a/deal.II/cmake/setup_custom_targets.cmake +++ b/deal.II/cmake/setup_custom_targets.cmake @@ -51,48 +51,3 @@ IF(DEAL_II_COMPONENT_CONTRIB) ) 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() - diff --git a/deal.II/cmake/setup_finalize.cmake b/deal.II/cmake/setup_finalize.cmake index 4a3fb3647b..567b108c13 100644 --- a/deal.II/cmake/setup_finalize.cmake +++ b/deal.II/cmake/setup_finalize.cmake @@ -141,9 +141,7 @@ FOREACH(_var ${_res}) 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() @@ -172,50 +170,6 @@ FOREACH(_var ${_res}) 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###" )