From: Matthias Maier Date: Tue, 15 Feb 2022 12:52:41 +0000 (-0600) Subject: CMake: Set ${CTEST_SITE} if unset X-Git-Tag: v9.4.0-rc1~492^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13387%2Fhead;p=dealii.git CMake: Set ${CTEST_SITE} if unset --- diff --git a/tests/run_testsuite.cmake b/tests/run_testsuite.cmake index 56be0e6395..9d811cef25 100644 --- a/tests/run_testsuite.cmake +++ b/tests/run_testsuite.cmake @@ -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")