From: Marc Fehling Date: Mon, 12 Aug 2024 21:16:19 +0000 (-0600) Subject: Retire DEAL_II_COMPILE_EXAMPLES. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48272106e613d5cd9e81de233a7002784d195e22;p=dealii.git Retire DEAL_II_COMPILE_EXAMPLES. --- diff --git a/cmake/checks/check_02_system_features.cmake b/cmake/checks/check_02_system_features.cmake index 7615691196..aed9a73778 100644 --- a/cmake/checks/check_02_system_features.cmake +++ b/cmake/checks/check_02_system_features.cmake @@ -104,15 +104,12 @@ if(CMAKE_SYSTEM_NAME MATCHES "Windows") # look up the linker tools error LNK1189. # # Unfortunately, this means that we are stuck with static linking. - # As a consequence each binary will be very large, so we also disable - # the compilation of examples. + # As a consequence each binary will be very large. # message(WARNING "\n" "BUILD_SHARED_LIBS forced to OFF\n\n" - "DEAL_II_COMPILE_EXAMPLES forced to OFF\n\n" ) set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) - set(DEAL_II_COMPILE_EXAMPLES OFF CACHE BOOL "" FORCE) # # In case we find a solution to enable dynamic linking in the future, diff --git a/cmake/setup_cached_variables.cmake b/cmake/setup_cached_variables.cmake index fc45eaf513..24265f2175 100644 --- a/cmake/setup_cached_variables.cmake +++ b/cmake/setup_cached_variables.cmake @@ -51,7 +51,6 @@ # # DEAL_II_WITH_64BIT_INDICES # DEAL_II_WITH_COMPLEX_VALUES -# DEAL_II_COMPILE_EXAMPLES # DEAL_II_DOXYGEN_USE_MATHJAX # DEAL_II_DOXYGEN_USE_ONLINE_MATHJAX # DEAL_II_CPACK_EXTERNAL_LIBS @@ -342,12 +341,6 @@ option(DEAL_II_WITH_COMPLEX_VALUES ) list(APPEND DEAL_II_FEATURES COMPLEX_VALUES) -option(DEAL_II_COMPILE_EXAMPLES - "If set to ON, all configurable example executables will be built and installed as well. If set to OFF, the examples component only installs the source code of example steps." - ON - ) -mark_as_advanced(DEAL_II_COMPILE_EXAMPLES) - option(DEAL_II_DOXYGEN_USE_MATHJAX "If set to ON, doxygen documentation is generated using mathjax" OFF diff --git a/contrib/docker/Dockerfile b/contrib/docker/Dockerfile index 0d545fbe89..99e4cab2b4 100644 --- a/contrib/docker/Dockerfile +++ b/contrib/docker/Dockerfile @@ -17,7 +17,6 @@ RUN cd /usr/src && \ cmake -GNinja \ -DCMAKE_PREFIX_PATH="/usr/lib/x86_64-linux-gnu/hdf5/openmpi;/usr/include/hdf5/openmpi" \ -DDEAL_II_ALLOW_AUTODETECTION=OFF \ - -DDEAL_II_COMPILE_EXAMPLES=OFF \ -DDEAL_II_COMPONENT_PYTHON_BINDINGS=ON \ -DCMAKE_CXX_FLAGS="-std=c++17" \ -DDEAL_II_WITH_64BIT_INDICES=OFF \ diff --git a/doc/developers/packaging.html b/doc/developers/packaging.html index 0e8db8cdab..1189f2f747 100644 --- a/doc/developers/packaging.html +++ b/doc/developers/packaging.html @@ -57,12 +57,6 @@ deleting these files. LICENSE.md should be installed in the correct directory for software licenses. -
  • - By default, all tutorial programs are compiled in both debug and release - mode and installed in the bin subdirectory of the installation - prefix. We recommend disabling the examples by configuring with - the -DDEAL_II_COMPILE_EXAMPLES=OFF option. -
  • The CMake configuration of deal.II will determine what compiler is being used and pick reasonable optimization and diff --git a/doc/news/changes/incompatibilities/20240812Fehling b/doc/news/changes/incompatibilities/20240812Fehling new file mode 100644 index 0000000000..4266ff981a --- /dev/null +++ b/doc/news/changes/incompatibilities/20240812Fehling @@ -0,0 +1,9 @@ +Removed: The CMake option `DEAL_II_COMPILE_EXAMPLES` has been removed. +As a consequence, examples will no longer be compiled if +`DEAL_II_COMPONENT_EXAMPLES` is set to true. +
    +You can use the testsuite to compile all examples at once. First, set up +the `setup_tests_examples` target, i.e., with `make setup_tests_examples`. +Then compile and run the examples with `ctest -R examples`. +
    +(Marc Fehling, 2024/08/12) diff --git a/doc/users/config.sample b/doc/users/config.sample index 0e2869ca5e..e63b161045 100644 --- a/doc/users/config.sample +++ b/doc/users/config.sample @@ -57,7 +57,6 @@ # # Miscellaneous options: # -# set(DEAL_II_COMPILE_EXAMPLES "ON" CACHE BOOL "") # set(DEAL_II_DOXYGEN_USE_MATHJAX "OFF" CACHE BOOL "") # set(DEAL_II_DOXYGEN_USE_ONLINE_MATHJAX "OFF" CACHE BOOL "") # set(DEAL_II_CPACK_EXTERNAL_LIBS "opt" CACHE STRING "") diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index ad29722e84..0bb93646b2 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -46,105 +46,6 @@ if(DEAL_II_COMPONENT_EXAMPLES) PATTERN "input/DTMB-5415_bulbous_bow.iges" # step-54 ) - if(DEAL_II_COMPILE_EXAMPLES) - # - # Make sure that there are no deprecated functions used in the tutorials. - # - strip_flag(DEAL_II_CXX_FLAGS "-Wno-deprecated-declarations") - - # - # Set up all executables: - # - file(GLOB _steps - ${CMAKE_CURRENT_SOURCE_DIR}/step-*/step-*.cc - ${CMAKE_CURRENT_SOURCE_DIR}/step-*/step-*.cu) - foreach(_step ${_steps}) - get_filename_component(_name ${_step} NAME_WE) - get_filename_component(_directory ${_step} DIRECTORY) - - # - # Extract dependency information from CMakeLists.txt file. - # - set(_setup FALSE) - if(EXISTS "${_directory}/CMakeLists.txt") - file(STRINGS "${_directory}/CMakeLists.txt" _dependency_string - REGEX "^if.*DEAL_II.* # keep in one line$" - ) - string(REPLACE "if(" "" _dependency_string "${_dependency_string}") - string(REPLACE ") # keep in one line" "" _dependency_string "${_dependency_string}") - if("${_dependency_string}" STREQUAL "") - set(_setup TRUE) - else() - # if the dependency string evaluates to TRUE then the example - # CMakeLists.txt encounters a fatal error - we want the opposite logic - # here so add a NOT. - evaluate_expression(" - if(NOT (${_dependency_string})) - set(_setup TRUE) - endif()") - endif() - endif() - - if(_setup) - foreach(_build ${DEAL_II_BUILD_TYPES}) - string(TOLOWER ${_build} _build_lowercase) - set(_target "example_${_name}_${_build_lowercase}") - string(REPLACE "-" "_" _target "${_target}") - add_executable(${_target} ${_step}) - insource_setup_target(${_target} ${_build}) - set_target_properties(${_target} - PROPERTIES - RUNTIME_OUTPUT_NAME "${_name}.${_build_lowercase}" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_EXECUTABLE_RELDIR}" - ) - # - # In case CMake is instructed to add rpaths to the library and - # exectuble on installation, make sure that we add an additional - # rpath to the library location as well: - # - if(CMAKE_INSTALL_RPATH_USE_LINK_PATH) - set_target_properties(${_target} - PROPERTIES - INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${DEAL_II_LIBRARY_RELDIR}" - ) - endif() - - add_dependencies(examples ${_target}) - install(TARGETS ${_target} - DESTINATION ${DEAL_II_EXAMPLES_RELDIR}/${_name} - ) - endforeach() - - else() - - message(STATUS " ${_name} - dependencies not satisfied") - endif() - - endforeach() - - # - # Also compile some documentation examples: - # - - file(GLOB _steps ${CMAKE_CURRENT_SOURCE_DIR}/doxygen/*.cc) - foreach(_step ${_steps}) - get_filename_component(_name ${_step} NAME_WE) - - foreach(_build ${DEAL_II_BUILD_TYPES}) - string(TOLOWER ${_build} _build_lowercase) - set(_target "example_${_name}_${_build_lowercase}") - string(REPLACE "-" "_" _target "${_target}") - add_executable(${_target} ${_step}) - insource_setup_target(${_target} ${_build}) - set_target_properties(${_target} - PROPERTIES - RUNTIME_OUTPUT_NAME "${_name}.${_build_lowercase}" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_EXECUTABLE_RELDIR}" - ) - endforeach() - endforeach() - endif() - message(STATUS "Setting up examples - Done") endif() diff --git a/tests/run_buildtest.cmake b/tests/run_buildtest.cmake index 776ce12ca0..26b0ee2223 100644 --- a/tests/run_buildtest.cmake +++ b/tests/run_buildtest.cmake @@ -1,6 +1,5 @@ if("${TRACK}" STREQUAL "") set(TRACK "Build Tests") endif() -set(DEAL_II_COMPILE_EXAMPLES TRUE) -set(TEST_PICKUP_REGEX "quick_tests/") +set(TEST_PICKUP_REGEX "quick_tests") include(${CMAKE_CURRENT_LIST_DIR}/run_testsuite.cmake) diff --git a/tests/run_performance_tests.cmake b/tests/run_performance_tests.cmake index 3fba17c6c8..e8f1161528 100644 --- a/tests/run_performance_tests.cmake +++ b/tests/run_performance_tests.cmake @@ -10,7 +10,6 @@ set(TRACK "Experimental") set_if_empty(SKIP_SUBMISSION TRUE) set(CMAKE_BUILD_TYPE Release) -set(DEAL_II_COMPILE_EXAMPLES FALSE) set(ENABLE_PERFORMANCE_TESTS TRUE)