3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 10:25:18 +00:00

Merge pull request #1391 from delcypher/cxx_example_use_cxx11

[CMake] Use C++11 is C++ API example
This commit is contained in:
Nikolaj Bjorner 2017-12-07 18:38:05 +05:30 committed by GitHub
commit 0cfea8946b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 1 deletions

View file

@ -1,7 +1,11 @@
RELEASE NOTES
Version 4.5.x
Version 4.6.0
=============
- New requirements:
- C++11 capable compiler to build Z3.
- C++ API now requires C++11 or newer.
- New features (including):
- A new string solver from University of Waterloo
- A new linear real arithmetic solver

View file

@ -13,6 +13,22 @@ find_package(Z3
# use this option.
NO_DEFAULT_PATH
)
################################################################################
# Z3 C++ API bindings require C++11
################################################################################
if ("${CMAKE_VERSION}" VERSION_LESS "3.1")
# Legacy CMake support
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else()
message(FATAL_ERROR "Setting C++ version to C++11 not supported for \"${CMAKE_CXX_COMPILER_ID}\"")
endif()
else ()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif ()
message(STATUS "Z3_FOUND: ${Z3_FOUND}")
message(STATUS "Found Z3 ${Z3_VERSION_STRING}")
message(STATUS "Z3_DIR: ${Z3_DIR}")