From: Matthias Maier Date: Sun, 2 Jul 2023 16:55:35 +0000 (-0500) Subject: update documentation X-Git-Tag: relicensing~766^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88b2a139a716cbd6fdd2a123d2cd7ef7ddc5db9f;p=dealii.git update documentation --- diff --git a/tests/examples/CMakeLists.txt b/tests/examples/CMakeLists.txt index a9fdd58a5c..6ec0070135 100644 --- a/tests/examples/CMakeLists.txt +++ b/tests/examples/CMakeLists.txt @@ -21,7 +21,7 @@ if (EXISTS "${DEAL_II_SOURCE_DIR}/examples") # # Create CMake file structure in the current binary dir: # - set(_base_directory "${CMAKE_CURRENT_SOURCE_DIR}") + set(_base_directory "${CMAKE_CURRENT_SOURCE_DIR}") set(_source_directory "${CMAKE_CURRENT_BINARY_DIR}/source") set(_binary_directory "${CMAKE_CURRENT_BINARY_DIR}/binary") message(STATUS "Temporary source directory: ${_source_directory}") @@ -37,7 +37,8 @@ if (EXISTS "${DEAL_II_SOURCE_DIR}/examples") enable_testing() file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CTestFile.cmake" "subdirs(binary)") - # and now call into the second half of our setup in the writable "source" - # directory: + # + # and call into the freshly created "source" directory: + # add_subdirectory(${_source_directory} ${_binary_directory}) endif() diff --git a/tests/examples/CMakeLists.txt.in b/tests/examples/CMakeLists.txt.in index 5399bb328a..1bc0c80d00 100644 --- a/tests/examples/CMakeLists.txt.in +++ b/tests/examples/CMakeLists.txt.in @@ -1,12 +1,16 @@ # -# Parse all diff files... +# We now parse all diff files and create rules to generate the step-*.cc +# files. +# +# Here, ${_base_directory} points to the base "tests/examples" directory, +# and ${DEAL_II_SOURCE_DIR} points to the deal.II main repository root. # file(GLOB _diff_files "${_base_directory}/*.diff") foreach(_diff_file ${_diff_files}) get_filename_component(_step "${_diff_file}" NAME_WLE) set(_source_file "${DEAL_II_SOURCE_DIR}/examples/${_step}/${_step}.cc") - set(_output_file "${_source_directory}/${_step}.cc") + set(_output_file "${CMAKE_CURRENT_SOURCE_DIR}/${_step}.cc") # ... and create a rule that updates all diff files if necessary during # testsuite invocation: @@ -24,7 +28,7 @@ foreach(_diff_file ${_diff_files}) file(GLOB _output_files "${_base_directory}/${_step}*.output*") foreach(_file ${_output_files}) get_filename_component(_destination "${_file}" NAME) - set(_destination "${_source_directory}/${_destination}") + set(_destination "${CMAKE_CURRENT_SOURCE_DIR}/${_destination}") file(CREATE_LINK ${_file} ${_destination} SYMBOLIC) endforeach() endforeach() diff --git a/tests/examples/update_diffs.sh b/tests/examples/update_diffs.sh index 1399c5879e..2f6375dc5f 100755 --- a/tests/examples/update_diffs.sh +++ b/tests/examples/update_diffs.sh @@ -23,7 +23,6 @@ for file in ${diff_files}; do if [[ -f "${source_file}" && -f "${modified_file}" ]]; then echo diff "${source_file}" "${modified_file}" "${file}" diff -c "${source_file}" "${modified_file}" > "${file}" - echo success else echo "No matching .cc files found for ${file}" exit 1