if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7 AND NOT CMAKE_VERSION VERSION_LESS 2.8.9)
message(FATAL_ERROR "GCC version must be at least 7! For example, if GCC 7 is available under gcc-7, g++-7 names, do the following: export CC=gcc-7 CXX=g++-7; rm -rf CMakeCache.txt CMakeFiles; and re run cmake or ./release.")
message(FATAL_ERROR "GCC version must be at least 7. For example, if GCC 7 is available under gcc-7, g++-7 names, do the following: export CC=gcc-7 CXX=g++-7; rm -rf CMakeCache.txt CMakeFiles; and re run cmake or ./release.")
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# Require at least clang 5
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
message(FATAL_ERROR "Clang version must be at least 5!")
message(FATAL_ERROR "Clang version must be at least 5.")
endif()
else()
message(WARNING "You are using an unsupported compiler! Compilation has only been tested with Clang 5+ and GCC 7+.")
message(WARNING "You are using an unsupported compiler. Compilation has only been tested with Clang 5+ and GCC 7+.")