]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Retire DEAL_II_COMPILE_EXAMPLES.
authorMarc Fehling <mafehling.git@gmail.com>
Mon, 12 Aug 2024 21:16:19 +0000 (15:16 -0600)
committerMarc Fehling <mafehling.git@gmail.com>
Mon, 12 Aug 2024 21:16:19 +0000 (15:16 -0600)
cmake/checks/check_02_system_features.cmake
cmake/setup_cached_variables.cmake
contrib/docker/Dockerfile
doc/developers/packaging.html
doc/news/changes/incompatibilities/20240812Fehling [new file with mode: 0644]
doc/users/config.sample
examples/CMakeLists.txt
tests/run_buildtest.cmake
tests/run_performance_tests.cmake

index 7615691196908a6f0e4dd50b7d80e4a4afec2c92..aed9a7377802a82d52a2ef2e5f7e6eaa917cda05 100644 (file)
@@ -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,
index fc45eaf51376cee1e47caaac0fa51a2eb4676778..24265f2175da2574e5234b425f506f672f4ed888 100644 (file)
@@ -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
index 0d545fbe89a5d3e4c25b61f686a345eb5f0fa8a3..99e4cab2b424c00d85eeca814612f7cda7fa9725 100644 (file)
@@ -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 \
index 0e8db8cdab9f3d8d6fa2346c9cc2f75b21b8751d..1189f2f747f9fbc8c1e24e01b5a94aeaed78bfcb 100644 (file)
         deleting these files. <tt>LICENSE.md</tt> should be installed in the
         correct directory for software licenses.
       </li>
-      <li>
-        By default, all tutorial programs are compiled in both debug and release
-        mode and installed in the <tt>bin</tt> subdirectory of the installation
-        prefix. We recommend disabling the examples by configuring with
-        the <tt>-DDEAL_II_COMPILE_EXAMPLES=OFF</tt> option.
-      </li>
       <li>
         The CMake configuration of <acronym>deal.II</acronym> 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 (file)
index 0000000..4266ff9
--- /dev/null
@@ -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.
+<br>
+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`.
+<br>
+(Marc Fehling, 2024/08/12)
index 0e2869ca5eaad1bf2d1388de722a4f914017c794..e63b16104593f5d5f74d38b6aabf2d5d0bf611df 100644 (file)
@@ -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 "")
index ad29722e84bfd1c90ea02da16d137b4072a7d3c9..0bb93646b24c7be1d58c6404d5295334141b1f77 100644 (file)
@@ -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()
index 776ce12ca0666506e0e5def669d9bbd9019e5694..26b0ee222357dbac2e45f09c67bf24e7e9e68b18 100644 (file)
@@ -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)
index 3fba17c6c88179b0ac9730acb9e6134dff869ed6..e8f1161528d285caa373dc7dd368ad8bc634ebfe 100644 (file)
@@ -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)
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.