From 7b6c7a584a7cf8964d494a51ae5217c230ef31bf Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 15 Feb 2022 06:52:41 -0600 Subject: [PATCH] CMake: Set ${CTEST_SITE} if unset --- tests/run_testsuite.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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") -- 2.39.5