CMake: Add initial support for MidnightBSD (#1377)

* Add initial support for MidnightBSD

* Cleanup some issues identified through code review.

Add libzfs check as MidnightBSD does have zfs.

* Add MidnightBSD check to the version.c detection

* Remove `OR MidnightBSD` tests

* Clean up

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
This commit is contained in:
Lucas Holt
2024-11-05 11:17:23 -05:00
committed by GitHub
parent 9a34cb98dc
commit f69a9dab33
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -20,6 +20,9 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
set(FreeBSD TRUE CACHE BOOL "..." FORCE)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
set(OpenBSD TRUE CACHE BOOL "..." FORCE)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "MidnightBSD")
set(FreeBSD TRUE CACHE BOOL "..." FORCE)
set(MidnightBSD TRUE CACHE BOOL "..." FORCE)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "NetBSD")
set(NetBSD TRUE CACHE BOOL "..." FORCE)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")
+2
View File
@@ -28,6 +28,8 @@
#define FF_SYSNAME "Linux"
#elif defined(__DragonFly__) // We define `__FreeBSD__` on DragonFly BSD for simplification
#define FF_SYSNAME "DragonFly"
#elif defined(__MidnightBSD__)
#define FF_SYSNAME "MidnightBSD"
#elif defined(__FreeBSD__)
#define FF_SYSNAME "FreeBSD"
#elif defined(__APPLE__)