mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 00:55:31 +00:00
clean up CMake code (#5182)
* CMake: simplify FindGMP.cmake Remove printing of all the different variables, and let FPHSA output the library name. Add an imported target, which bundles the library and the include directories for easier usage. * fix build: vector::c_ptr() now is vector::data() * CMake: use Threads::Threads imported module Otherwise the setting of THREADS_PREFER_PTHREAD_FLAG has no effect. * CMake: remove needless policy setting The minimum required version is CMake 3.4, where these policies are already set to new because they were introduced earlier. * CMake: remove needless variable expansion
This commit is contained in:
parent
ce96182746
commit
7f8e2a9f75
13 changed files with 69 additions and 94 deletions
|
@ -28,7 +28,7 @@ add_executable(cpp_example example.cpp)
|
|||
target_include_directories(cpp_example PRIVATE ${Z3_CXX_INCLUDE_DIRS})
|
||||
target_link_libraries(cpp_example PRIVATE ${Z3_LIBRARIES})
|
||||
|
||||
if ("${CMAKE_SYSTEM_NAME}" MATCHES "[Ww]indows")
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "[Ww]indows")
|
||||
# On Windows we need to copy the Z3 libraries
|
||||
# into the same directory as the executable
|
||||
# so that they can be found.
|
||||
|
|
|
@ -40,7 +40,7 @@ endif()
|
|||
target_include_directories(c_example PRIVATE ${Z3_C_INCLUDE_DIRS})
|
||||
target_link_libraries(c_example PRIVATE ${Z3_LIBRARIES})
|
||||
|
||||
if ("${CMAKE_SYSTEM_NAME}" MATCHES "[Ww]indows")
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "[Ww]indows")
|
||||
# On Windows we need to copy the Z3 libraries
|
||||
# into the same directory as the executable
|
||||
# so that they can be found.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
find_package(Dotnet REQUIRED)
|
||||
|
||||
if("${TARGET_ARCHITECTURE}" STREQUAL "i686")
|
||||
if(TARGET_ARCHITECTURE STREQUAL "i686")
|
||||
set(Z3_DOTNET_PLATFORM "x86")
|
||||
else()
|
||||
set(Z3_DOTNET_PLATFORM "AnyCPU")
|
||||
|
|
|
@ -35,7 +35,7 @@ if (FORCE_CXX_LINKER)
|
|||
)
|
||||
endif()
|
||||
|
||||
if ("${CMAKE_SYSTEM_NAME}" MATCHES "[Ww]indows")
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "[Ww]indows")
|
||||
# On Windows we need to copy the Z3 libraries
|
||||
# into the same directory as the executable
|
||||
# so that they can be found.
|
||||
|
|
|
@ -28,7 +28,7 @@ add_executable(z3_tptp5 tptp5.cpp tptp5.lex.cpp)
|
|||
target_include_directories(z3_tptp5 PRIVATE ${Z3_CXX_INCLUDE_DIRS})
|
||||
target_link_libraries(z3_tptp5 PRIVATE ${Z3_LIBRARIES})
|
||||
|
||||
if ("${CMAKE_SYSTEM_NAME}" MATCHES "[Ww]indows")
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "[Ww]indows")
|
||||
# On Windows we need to copy the Z3 libraries
|
||||
# into the same directory as the executable
|
||||
# so that they can be found.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue