summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-02-05 12:27:52 +0100
committerlouiz’ <louiz@louiz.org>2018-02-05 12:27:52 +0100
commite0d1a0b44add408504e428d6ce4a8a2121ea7a00 (patch)
tree4b2c2afe188de95b10e082992e65cec9d365ce4a
parent1ebd8a2321c454129d921dc71777f47b97b8db97 (diff)
downloadbiboumi-e0d1a0b44add408504e428d6ce4a8a2121ea7a00.tar.gz
biboumi-e0d1a0b44add408504e428d6ce4a8a2121ea7a00.tar.bz2
biboumi-e0d1a0b44add408504e428d6ce4a8a2121ea7a00.tar.xz
biboumi-e0d1a0b44add408504e428d6ce4a8a2121ea7a00.zip
Add a check for GCC’s and Clang’s minimal versions
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f30037c..2b3f292 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,16 @@ set(${PROJECT_NAME}_VERSION_MAJOR 8)
set(${PROJECT_NAME}_VERSION_MINOR 0)
set(${PROJECT_NAME}_VERSION_SUFFIX "~dev")
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
+ message(FATAL_ERROR "GCC version must be at least 5.0.")
+ endif()
+elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
+ message(FATAL_ERROR "Clang version must be at least 3.4.")
+ endif()
+endif()
+
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
"Build type (Release/Debug/RelWithDebInfo/MinSizeRel)" FORCE)