]> https://gitweb.dealii.org/ - dealii.git/commitdiff
update documentation
authorMatthias Maier <tamiko@43-1.org>
Sun, 2 Jul 2023 16:55:35 +0000 (11:55 -0500)
committerMatthias Maier <tamiko@43-1.org>
Mon, 3 Jul 2023 04:03:19 +0000 (23:03 -0500)
tests/examples/CMakeLists.txt
tests/examples/CMakeLists.txt.in
tests/examples/update_diffs.sh

index a9fdd58a5c0b624a3deb5d2954e0e3b766f3d82e..6ec0070135c994872636e995dea5edff700613b1 100644 (file)
@@ -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()
index 5399bb328ab93f90137b517aca633856b44c97e5..1bc0c80d00e31a285d9be7aeb5eb757bdc63ea3a 100644 (file)
@@ -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()
index 1399c5879ef0ee290fedb58194c7a9c04fd6aa3c..2f6375dc5f8078af495a049ffa55cb4fa3e8e2b4 100755 (executable)
@@ -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

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.