parent
823e0a3a61
commit
5d2b89d5fa
@ -323,6 +323,7 @@ Variables that Describe the System
|
||||
/variable/CMAKE_COMPILER_2005
|
||||
/variable/CMAKE_HOST_APPLE
|
||||
/variable/CMAKE_HOST_BSD
|
||||
/variable/CMAKE_HOST_EXECUTABLE_SUFFIX
|
||||
/variable/CMAKE_HOST_LINUX
|
||||
/variable/CMAKE_HOST_SOLARIS
|
||||
/variable/CMAKE_HOST_SYSTEM
|
||||
|
5
Help/release/dev/cmake_host_executable_suffix.rst
Normal file
5
Help/release/dev/cmake_host_executable_suffix.rst
Normal file
@ -0,0 +1,5 @@
|
||||
cmake-host-executable-suffix
|
||||
----------------------------
|
||||
|
||||
* The :variable:`CMAKE_HOST_EXECUTABLE_SUFFIX` variable was added to
|
||||
provide suffix for executable names on the host platform.
|
@ -1,10 +1,14 @@
|
||||
CMAKE_EXECUTABLE_SUFFIX
|
||||
-----------------------
|
||||
|
||||
The suffix for executables on this platform.
|
||||
The suffix for executables on the target platform.
|
||||
|
||||
The suffix to use for the end of an executable filename if any, ``.exe``
|
||||
on Windows.
|
||||
|
||||
:variable:`CMAKE_EXECUTABLE_SUFFIX_<LANG>` overrides this for
|
||||
language ``<LANG>``.
|
||||
|
||||
|
||||
See the :variable:`CMAKE_HOST_EXECUTABLE_SUFFIX` variable for the
|
||||
executable suffix on the host platform.
|
||||
|
12
Help/variable/CMAKE_HOST_EXECUTABLE_SUFFIX.rst
Normal file
12
Help/variable/CMAKE_HOST_EXECUTABLE_SUFFIX.rst
Normal file
@ -0,0 +1,12 @@
|
||||
CMAKE_HOST_EXECUTABLE_SUFFIX
|
||||
----------------------------
|
||||
|
||||
.. versionadded:: 3.31
|
||||
|
||||
The suffix for executables on the host platform. This may differ from
|
||||
the suffix for the target platform, :variable:`CMAKE_EXECUTABLE_SUFFIX`.
|
||||
|
||||
The suffix to use for the end of an executable filename if any, ``.exe``
|
||||
on Windows.
|
||||
|
||||
See also :variable:`CMAKE_EXECUTABLE_SUFFIX`.
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user