Require gcc >= 5.0.

This commit is contained in:
Daniel Kirchner 2019-06-05 11:55:26 +02:00
parent d01c4195f8
commit 5677bedf34
2 changed files with 4 additions and 3 deletions

View File

@ -13,6 +13,7 @@ Bugfixes:
Build System: Build System:
* Attempt to use stock Z3 cmake files to find Z3 and only fall back to manual discovery. * Attempt to use stock Z3 cmake files to find Z3 and only fall back to manual discovery.
* Generate a cmake error for gcc versions older than 5.0.

View File

@ -41,11 +41,11 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
# Additional GCC-specific compiler settings. # Additional GCC-specific compiler settings.
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
# Check that we've got GCC 4.7 or newer. # Check that we've got GCC 5.0 or newer.
execute_process( execute_process(
COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)) if (NOT (GCC_VERSION VERSION_GREATER 5.0 OR GCC_VERSION VERSION_EQUAL 5.0))
message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.7 or greater.") message(FATAL_ERROR "${PROJECT_NAME} requires g++ 5.0 or greater.")
endif () endif ()
# Additional Clang-specific compiler settings. # Additional Clang-specific compiler settings.