Solaris: Add a CMAKE_HOST_SOLARIS variable (#16061)

This commit is contained in:
Stafen Teleman 2016-04-13 12:36:36 -07:00 committed by Brad King
parent 52dddefcbb
commit 5dc6cfd6ea
4 changed files with 15 additions and 0 deletions

View File

@ -175,6 +175,7 @@ Variables that Describe the System
/variable/CMAKE_CL_64 /variable/CMAKE_CL_64
/variable/CMAKE_COMPILER_2005 /variable/CMAKE_COMPILER_2005
/variable/CMAKE_HOST_APPLE /variable/CMAKE_HOST_APPLE
/variable/CMAKE_HOST_SOLARIS
/variable/CMAKE_HOST_SYSTEM_NAME /variable/CMAKE_HOST_SYSTEM_NAME
/variable/CMAKE_HOST_SYSTEM_PROCESSOR /variable/CMAKE_HOST_SYSTEM_PROCESSOR
/variable/CMAKE_HOST_SYSTEM /variable/CMAKE_HOST_SYSTEM

View File

@ -0,0 +1,5 @@
cmake-host-solaris
------------------
* A new :variable:`CMAKE_HOST_SOLARIS` variable was introduced to
indicate when CMake is running on an Oracle Solaris host.

View File

@ -0,0 +1,6 @@
CMAKE_HOST_SOLARIS
------------------
``True`` for Oracle Solaris operating systems.
Set to ``true`` when the host system is Oracle Solaris.

View File

@ -1425,6 +1425,9 @@ void cmState::Snapshot::SetDefaultDefinitions()
this->SetDefinition("APPLE", "1"); this->SetDefinition("APPLE", "1");
this->SetDefinition("CMAKE_HOST_APPLE", "1"); this->SetDefinition("CMAKE_HOST_APPLE", "1");
#endif #endif
#if defined(__sun__)
this->SetDefinition("CMAKE_HOST_SOLARIS", "1");
#endif
char temp[1024]; char temp[1024];
sprintf(temp, "%d", cmVersion::GetMinorVersion()); sprintf(temp, "%d", cmVersion::GetMinorVersion());