mirror of
https://github.com/Z3Prover/z3
synced 2025-08-30 23:10:08 +00:00
Remove all per-OS defines apart from _WINDOWS.
These are all unused and shouldn't be needed. Mostly we need something for differentiating between POSIX and non-POSIX (until we can reduce some of those differences as well). We shouldn't need to modify the build system to build on a new OS if it is basically a Unix and is supported by cmake.
This commit is contained in:
parent
85b96dc877
commit
dc75031a36
2 changed files with 1 additions and 41 deletions
|
@ -178,32 +178,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||
################################################################################
|
||||
# Platform detection
|
||||
################################################################################
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
message(STATUS "Platform: Linux")
|
||||
list(APPEND Z3_COMPONENT_CXX_DEFINES "-D_LINUX_")
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
message(STATUS "Platform: Android")
|
||||
list(APPEND Z3_COMPONENT_CXX_DEFINES "-D_ANDROID_")
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "GNU")
|
||||
message(STATUS "Platform: GNU/Hurd")
|
||||
list(APPEND Z3_COMPONENT_CXX_DEFINES "-D_HURD_")
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
if (TARGET_ARCHITECTURE STREQUAL "arm64")
|
||||
set(CMAKE_OSX_ARCHITECTURES "arm64")
|
||||
endif()
|
||||
message(STATUS "Platform: Darwin")
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
message(STATUS "Platform: FreeBSD")
|
||||
list(APPEND Z3_COMPONENT_CXX_DEFINES "-D_FREEBSD_")
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
|
||||
message(STATUS "Platform: NetBSD")
|
||||
list(APPEND Z3_COMPONENT_CXX_DEFINES "-D_NetBSD_")
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||
message(STATUS "Platform: OpenBSD")
|
||||
list(APPEND Z3_COMPONENT_CXX_DEFINES "-D_OPENBSD_")
|
||||
elseif (CYGWIN)
|
||||
message(STATUS "Platform: Cygwin")
|
||||
list(APPEND Z3_COMPONENT_CXX_DEFINES "-D_CYGWIN")
|
||||
elseif (WIN32)
|
||||
message(STATUS "Platform: Windows")
|
||||
list(APPEND Z3_COMPONENT_CXX_DEFINES "-D_WINDOWS")
|
||||
|
@ -216,8 +194,6 @@ elseif (EMSCRIPTEN)
|
|||
"-s DISABLE_EXCEPTION_CATCHING=0"
|
||||
"-s ERROR_ON_UNDEFINED_SYMBOLS=1"
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR "Platform \"${CMAKE_SYSTEM_NAME}\" not recognised")
|
||||
endif()
|
||||
|
||||
list(APPEND Z3_COMPONENT_EXTRA_INCLUDE_DIRS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue