# 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,
#
# 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
)
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
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 \
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
--- /dev/null
+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)
#
# 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 "")
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()
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)
set_if_empty(SKIP_SUBMISSION TRUE)
set(CMAKE_BUILD_TYPE Release)
-set(DEAL_II_COMPILE_EXAMPLES FALSE)
set(ENABLE_PERFORMANCE_TESTS TRUE)