reorganize OS detection

This commit is contained in:
Konstantinos Margaritis 2023-12-20 17:16:45 +02:00
parent 44f19c1006
commit a7a12844e7

View File

@ -7,16 +7,15 @@ if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
endif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
option(FAT_RUNTIME "Build a library that supports multiple microarchitectures" OFF)
message("Checking Fat Runtime Requirements...")
if (FAT_RUNTIME AND NOT LINUX)
if (FAT_RUNTIME)
message("Checking Fat Runtime Requirements...")
if (NOT LINUX)
message(FATAL_ERROR "Fat runtime is only supported on Linux OS")
endif()
if (USE_CPU_NATIVE AND FAT_RUNTIME)
else()
if (USE_CPU_NATIVE AND FAT_RUNTIME)
message(FATAL_ERROR "Fat runtime is not compatible with Native CPU detection")
endif()
endif()
if (FAT_RUNTIME AND LINUX)
if (NOT (ARCH_IA32 OR ARCH_X86_64 OR ARCH_AARCH64))
message(FATAL_ERROR "Fat runtime is only supported on Intel and Aarch64 architectures")
else()
@ -32,9 +31,8 @@ if (FAT_RUNTIME AND LINUX)
endif()
endif()
endif()
endif()
if (NOT RELEASE_BUILD)
message(FATAL_ERROR "Fat runtime is only built on Release builds")
endif()
endif ()