mirror of
https://github.com/Z3Prover/z3
synced 2025-04-14 21:08:46 +00:00
Merge branch 'master' of https://github.com/z3prover/z3
This commit is contained in:
commit
d6e0f7659d
|
@ -189,7 +189,6 @@ endif()
|
|||
# Note for some reason we have to leave off ``-D`` here otherwise
|
||||
# we get ``-D-DZ3DEBUG`` passed to the compiler
|
||||
list(APPEND Z3_COMPONENT_CXX_DEFINES $<$<CONFIG:Debug>:Z3DEBUG>)
|
||||
list(APPEND Z3_COMPONENT_CXX_DEFINES $<$<CONFIG:Debug>:LEAN_DEBUG>)
|
||||
list(APPEND Z3_COMPONENT_CXX_DEFINES $<$<CONFIG:Release>:_EXTERNAL_RELEASE>)
|
||||
list(APPEND Z3_COMPONENT_CXX_DEFINES $<$<CONFIG:RelWithDebInfo>:_EXTERNAL_RELEASE>)
|
||||
|
||||
|
@ -272,45 +271,6 @@ list(APPEND Z3_COMPONENT_EXTRA_INCLUDE_DIRS
|
|||
"${CMAKE_SOURCE_DIR}/src"
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Linux specific configuration
|
||||
################################################################################
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
# Try to detect if it is necessary to link against librt.
|
||||
# Note that glibc < 2.17 required librt to be linked to use clock_gettime()
|
||||
# and friends.
|
||||
set(CLOCK_GETTIME_REQUIRES_LIBRT_TEST_CODE
|
||||
"
|
||||
#include <time.h>
|
||||
int main() {
|
||||
timespec res;
|
||||
int result = clock_gettime(CLOCK_REALTIME, &res);
|
||||
return result == 0;
|
||||
}
|
||||
"
|
||||
)
|
||||
check_cxx_source_compiles(
|
||||
"${CLOCK_GETTIME_REQUIRES_LIBRT_TEST_CODE}"
|
||||
CLOCK_GETTIME_NO_REQUIRE_LIBRT
|
||||
)
|
||||
if (NOT CLOCK_GETTIME_NO_REQUIRE_LIBRT)
|
||||
# Try again with librt
|
||||
message(STATUS "Failed to link against clock_gettime(), trying with librt")
|
||||
set(CMAKE_REQUIRED_LIBRARIES_OLD "${CMAKE_REQUIRED_LIBRARIES}")
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} rt")
|
||||
check_cxx_source_compiles(
|
||||
"${CLOCK_GETTIME_REQUIRES_LIBRT_TEST_CODE}"
|
||||
CLOCK_GETTIME_REQUIRES_LIBRT
|
||||
)
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES_OLD}")
|
||||
if (CLOCK_GETTIME_REQUIRES_LIBRT)
|
||||
list(APPEND Z3_DEPENDENT_LIBS "rt")
|
||||
else()
|
||||
message(FATAL_ERROR "Failed to link against clock_gettime()")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
################################################################################
|
||||
# GNU multiple precision library support
|
||||
################################################################################
|
||||
|
|
|
@ -2832,24 +2832,18 @@ def mk_config():
|
|||
CXXFLAGS = '%s -D_LINUX_' % CXXFLAGS
|
||||
OS_DEFINES = '-D_LINUX_'
|
||||
SO_EXT = '.so'
|
||||
LDFLAGS = '%s -lrt' % LDFLAGS
|
||||
SLIBFLAGS = '-shared'
|
||||
SLIBEXTRAFLAGS = '%s -lrt' % SLIBEXTRAFLAGS
|
||||
SLIBEXTRAFLAGS = '%s -Wl,-soname,libz3.so' % SLIBEXTRAFLAGS
|
||||
elif sysname == 'FreeBSD':
|
||||
CXXFLAGS = '%s -D_FREEBSD_' % CXXFLAGS
|
||||
OS_DEFINES = '-D_FREEBSD_'
|
||||
SO_EXT = '.so'
|
||||
LDFLAGS = '%s -lrt' % LDFLAGS
|
||||
SLIBFLAGS = '-shared'
|
||||
SLIBEXTRAFLAGS = '%s -lrt' % SLIBEXTRAFLAGS
|
||||
elif sysname == 'NetBSD':
|
||||
CXXFLAGS = '%s -D_NETBSD_' % CXXFLAGS
|
||||
OS_DEFINES = '-D_NETBSD_'
|
||||
SO_EXT = '.so'
|
||||
LDFLAGS = '%s -lrt' % LDFLAGS
|
||||
SLIBFLAGS = '-shared'
|
||||
SLIBEXTRAFLAGS = '%s -lrt' % SLIBEXTRAFLAGS
|
||||
elif sysname == 'OpenBSD':
|
||||
CXXFLAGS = '%s -D_OPENBSD_' % CXXFLAGS
|
||||
OS_DEFINES = '-D_OPENBSD_'
|
||||
|
|
Loading…
Reference in a new issue