summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorleha-bot <leha-bot@yandex.ru>2024-09-29 11:16:26 (GMT)
committerBrad King <brad.king@kitware.com>2024-10-02 14:39:40 (GMT)
commit5d2b89d5faeb01d094066dd91b65f230c4d9389a (patch)
tree1d271b29914963375effebd4ee2735cd92beb1c7 /Source
parent823e0a3a6187f02c06b86c32d6966eff25b9abc8 (diff)
downloadCMake-5d2b89d5faeb01d094066dd91b65f230c4d9389a.zip
CMake-5d2b89d5faeb01d094066dd91b65f230c4d9389a.tar.gz
CMake-5d2b89d5faeb01d094066dd91b65f230c4d9389a.tar.bz2
Add CMAKE_HOST_EXECUTABLE_SUFFIX for Unix/Windows
Closes: #17553
Diffstat (limited to 'Source')
-rw-r--r--Source/cmStateSnapshot.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx
index 8217a9c..6ee0225 100644
--- a/Source/cmStateSnapshot.cxx
+++ b/Source/cmStateSnapshot.cxx
@@ -298,9 +298,11 @@ void cmStateSnapshot::SetDefaultDefinitions()
if (hostSystemName == "Windows") {
this->SetDefinition("WIN32", "1");
this->SetDefinition("CMAKE_HOST_WIN32", "1");
+ this->SetDefinition("CMAKE_HOST_EXECUTABLE_SUFFIX", ".exe");
} else {
this->SetDefinition("UNIX", "1");
this->SetDefinition("CMAKE_HOST_UNIX", "1");
+ this->SetDefinition("CMAKE_HOST_EXECUTABLE_SUFFIX", "");
}
#if defined(__APPLE__)
this->SetDefinition("APPLE", "1");