summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmStateSnapshot.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx
index f73df8f..102d1ce 100644
--- a/Source/cmStateSnapshot.cxx
+++ b/Source/cmStateSnapshot.cxx
@@ -317,6 +317,20 @@ void cmStateSnapshot::SetDefaultDefinitions()
this->SetDefinition("CMAKE_HOST_SOLARIS", "1");
#endif
+#if defined(__OpenBSD__)
+ this->SetDefinition("BSD", "OpenBSD");
+ this->SetDefinition("CMAKE_HOST_BSD", "OpenBSD");
+#elif defined(__FreeBSD__)
+ this->SetDefinition("BSD", "FreeBSD");
+ this->SetDefinition("CMAKE_HOST_BSD", "FreeBSD");
+#elif defined(__NetBSD__)
+ this->SetDefinition("BSD", "NetBSD");
+ this->SetDefinition("CMAKE_HOST_BSD", "NetBSD");
+#elif defined(__DragonFly__)
+ this->SetDefinition("BSD", "DragonFlyBSD");
+ this->SetDefinition("CMAKE_HOST_BSD", "DragonFlyBSD");
+#endif
+
this->SetDefinition("CMAKE_MAJOR_VERSION",
std::to_string(cmVersion::GetMajorVersion()));
this->SetDefinition("CMAKE_MINOR_VERSION",