mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 17:44:08 +00:00
Merge pull request #1635 from danielschemmel/cmake-cpp11
Use CMake's own mechanism for selecting language version
This commit is contained in:
commit
c390b72e42
|
@ -218,12 +218,17 @@ include(${CMAKE_SOURCE_DIR}/cmake/z3_add_cxx_flag.cmake)
|
|||
################################################################################
|
||||
# C++ language version
|
||||
################################################################################
|
||||
# FIXME: Use CMake's own mechanism for selecting language version
|
||||
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
|
||||
z3_add_cxx_flag("-std=c++11" REQUIRED)
|
||||
else()
|
||||
message(AUTHOR_WARNING "Not setting C++ language version for compiler")
|
||||
endif()
|
||||
if ("${CMAKE_VERSION}" VERSION_LESS "3.1")
|
||||
# FIXME: Drop this when we upgrade to newer CMake versions.
|
||||
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
|
||||
z3_add_cxx_flag("-std=c++11" REQUIRED)
|
||||
else()
|
||||
message(AUTHOR_WARNING "Not setting C++ language version for compiler")
|
||||
endif()
|
||||
else ()
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
endif ()
|
||||
|
||||
################################################################################
|
||||
# Platform detection
|
||||
|
|
Loading…
Reference in a new issue