]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Testsuite: make target names compatible with 9.3 13417/head
authorMatthias Maier <tamiko@43-1.org>
Fri, 18 Feb 2022 14:01:51 +0000 (08:01 -0600)
committerMatthias Maier <tamiko@43-1.org>
Fri, 18 Feb 2022 14:01:51 +0000 (08:01 -0600)
cmake/macros/macro_deal_ii_add_test.cmake

index 77cb403c8d5d8418fe33f59dbf6cacc1b2437179..c6edca761765ad4c0eb17a51f85e1cdaa70e2abc 100644 (file)
@@ -338,17 +338,26 @@ FUNCTION(DEAL_II_ADD_TEST _category _test_name _comparison_file)
       # aesthetic reasons chose to not create the directory for
       # "mpirun_0-threads_0".
       #
-      IF("${_n_cpu}" STREQUAL "0" AND "${_n_threads}" STREQUAL "0")
-        SET(_test_target ${_category}.${_test_name}.${_build_lowercase}.test) # diff target name
-        SET(_test_full ${_category}/${_test_name}.${_build_lowercase}) # full test name
-        SET(_test_directory ${CMAKE_CURRENT_BINARY_DIR}/${_test_name}.${_build_lowercase}) # directory to run the test in
 
-      ELSE()
-        SET(_test_target ${_category}.${_test_name}.mpirun${_n_cpu}.threads${_n_threads}.${_build_lowercase}.test) # diff target name
-        SET(_test_full   ${_category}/${_test_name}.mpirun=${_n_cpu}.threads=${_n_threads}.${_build_lowercase}) # full test name
-        SET(_test_directory ${CMAKE_CURRENT_BINARY_DIR}/${_test_name}.${_build_lowercase}/mpirun_${_n_cpu}-threads_${_n_threads}) # directory to run the test in
+      SET(_test_target    ${_category}.${_test_name}) # diff target name
+      SET(_test_full      ${_category}/${_test_name}) # full test name
+      SET(_test_directory ${CMAKE_CURRENT_BINARY_DIR}/${_test_name}.${_build_lowercase}) # directory to run the test in
+
+      IF(NOT "${_n_cpu}" STREQUAL "0")
+        STRING(APPEND _test_target   ".mpirun${_n_cpu}")
+        STRING(APPEND _test_full     ".mpirun=${_n_cpu}")
+        STRING(APPEND _test_directory "/mpirun=${_n_cpu}")
       ENDIF()
 
+      IF(NOT "${_n_threads}" STREQUAL "0")
+        STRING(APPEND _test_target   ".threads${_n_threads}")
+        STRING(APPEND _test_full     ".threads=${_n_threads}")
+        STRING(APPEND _test_directory "/threads=${_n_threads}")
+      ENDIF()
+
+      STRING(APPEND _test_target ".${_build_lowercase}.test")
+      STRING(APPEND _test_full   ".${_build_lowercase}")
+
       #
       # Test variants with ".mpirun=[...]." have to be executed via mpirun
       # (or whatever ${DEAL_II_MPIEXEC} is set to).

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.