From 92059942e63b4605e1434dd70a49829420be7d18 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Thu, 7 Dec 2017 00:48:20 +0000 Subject: [PATCH 1/2] [CMake] Use C++11 when building C++ API example. This is a change requested by @NikolajBjorner ( https://github.com/Z3Prover/z3/commit/5f8c97532ce6eb8b26c66a18caca53bd8596680c#commitcomment-26049417 ). --- examples/c++/CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/examples/c++/CMakeLists.txt b/examples/c++/CMakeLists.txt index d60604924..0a41d6a93 100644 --- a/examples/c++/CMakeLists.txt +++ b/examples/c++/CMakeLists.txt @@ -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}") From 1941a539996f32e4dcb6add072b9db6cca971915 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Thu, 7 Dec 2017 00:53:54 +0000 Subject: [PATCH 2/2] [Release Notes] Note that C++11 is required to build Z3 and is also required by the C++ API bindings. --- RELEASE_NOTES | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index ec05160da..e85e3d8d6 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -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