From 855a4dea8eebeb6c6b0398fd7c7c8411df1be6fe Mon Sep 17 00:00:00 2001 From: iliana etaoin Date: Tue, 17 Sep 2024 17:19:07 +0000 Subject: [PATCH] only attempt to detect illumos on plausible hosts --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d2b7d7320a..ac9e530823 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,16 +61,16 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") endif() endif() -if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "SunOS") # Determine if the host is running an illumos distribution: execute_process(COMMAND /usr/bin/uname -o OUTPUT_VARIABLE UNAME_O OUTPUT_STRIP_TRAILING_WHITESPACE) if (UNAME_O STREQUAL "illumos") - set(ILLUMOS 1) + set(HOST_ILLUMOS 1) endif() - if (ILLUMOS) + if (HOST_ILLUMOS) # # illumos systems require linking libsocket and libnsl to get various # networking routines sometimes found in libc on other platforms: @@ -811,7 +811,7 @@ if(OPENSSL_NO_SSE2_FOR_TESTING) add_definitions(-DOPENSSL_NO_SSE2_FOR_TESTING) endif() -if(ILLUMOS) +if(HOST_ILLUMOS) # # CMAKE_SYSTEM_PROCESSOR unfortunately comes from the output of "uname -p", # which on illumos systems emits "i386". Instead, use the value from