diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2022-09-09 18:10:43 (GMT) |
---|---|---|
committer | Cristian Adam <cristian.adam@gmail.com> | 2022-09-09 18:10:43 (GMT) |
commit | caffb15d096116f45597c9c51c23041ff9b39de3 (patch) | |
tree | bb662f2173713f17073ee64efe1648e0c81dc7d7 /Source/cmStateSnapshot.cxx | |
parent | 12de4ea2e8efc00c57c731b4a42066ef6d20e099 (diff) | |
download | CMake-caffb15d096116f45597c9c51c23041ff9b39de3.zip CMake-caffb15d096116f45597c9c51c23041ff9b39de3.tar.gz CMake-caffb15d096116f45597c9c51c23041ff9b39de3.tar.bz2 |
LINUX: Set CMAKE_HOST_LINUX variable when running on a Linux host
Relates: #23840
Diffstat (limited to 'Source/cmStateSnapshot.cxx')
-rw-r--r-- | Source/cmStateSnapshot.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx index 102d1ce..c51650a 100644 --- a/Source/cmStateSnapshot.cxx +++ b/Source/cmStateSnapshot.cxx @@ -331,6 +331,11 @@ void cmStateSnapshot::SetDefaultDefinitions() this->SetDefinition("CMAKE_HOST_BSD", "DragonFlyBSD"); #endif +#if defined(__linux__) + this->SetDefinition("LINUX", "1"); + this->SetDefinition("CMAKE_HOST_LINUX", "1"); +#endif + this->SetDefinition("CMAKE_MAJOR_VERSION", std::to_string(cmVersion::GetMajorVersion())); this->SetDefinition("CMAKE_MINOR_VERSION", |