mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
CTest: Avoid invoking external tool to get the host name
Populate the SITE cache entry using an internal query instead.
This commit is contained in:
@@ -194,7 +194,14 @@ if(BUILD_TESTING)
|
||||
"Extra command line flags to pass to the coverage tool")
|
||||
|
||||
# set the site name
|
||||
site_name(SITE)
|
||||
if(COMMAND cmake_host_system_information)
|
||||
cmake_host_system_information(RESULT _ctest_hostname QUERY HOSTNAME)
|
||||
set(SITE "${_ctest_hostname}" CACHE STRING "Name of the computer/site where compile is being run")
|
||||
unset(_ctest_hostname)
|
||||
else()
|
||||
# This code path is needed for CMake itself during bootstrap.
|
||||
site_name(SITE)
|
||||
endif()
|
||||
# set the build name
|
||||
if(NOT BUILDNAME)
|
||||
set(DART_COMPILER "${CMAKE_CXX_COMPILER}")
|
||||
|
||||
Reference in New Issue
Block a user