]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Set ${CTEST_SITE} if unset 13387/head
authorMatthias Maier <tamiko@43-1.org>
Tue, 15 Feb 2022 12:52:41 +0000 (06:52 -0600)
committerMatthias Maier <tamiko@43-1.org>
Tue, 15 Feb 2022 12:55:36 +0000 (06:55 -0600)
tests/run_testsuite.cmake

index 56be0e6395451cdf35a0689815ed20865ac3e9ce..9d811cef25bd3ae62b40fa0a419cbcd09bd5e92b 100644 (file)
@@ -231,11 +231,12 @@ MESSAGE("-- CTEST_CMAKE_GENERATOR:  ${CTEST_CMAKE_GENERATOR}")
 # CTEST_SITE:
 #
 
-IF(NOT "${CTEST_SITE}" STREQUAL "")
+IF("${CTEST_SITE}" STREQUAL "")
   FIND_PROGRAM(HOSTNAME_COMMAND NAMES hostname)
   IF(NOT "${HOSTNAME_COMMAND}" MATCHES "-NOTFOUND")
     EXEC_PROGRAM(${HOSTNAME_COMMAND} OUTPUT_VARIABLE _hostname)
     STRING(REGEX REPLACE "\\..*$" "" _hostname ${_hostname})
+    SET(CTEST_SITE "${_hostname}")
   ELSE()
     # Well, no hostname available. What about:
     SET(CTEST_SITE "BobMorane")

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.