aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-02-21 18:47:57 +0100
committerAlex Neundorf <neundorf@kde.org>2013-02-27 21:53:31 +0100
commit4a09c64aa457069b1a8b62d03941e0fc8bfc6b0f (patch)
tree05e24aa38d82f14b52dbadc89c2b663b8f00f9ae
parent4ae2d3b6a2160c9582ee3745c431a2adb0d92e97 (diff)
downloadextra-cmake-modules-4a09c64aa457069b1a8b62d03941e0fc8bfc6b0f.tar.gz
extra-cmake-modules-4a09c64aa457069b1a8b62d03941e0fc8bfc6b0f.tar.bz2
Add a check for the minimum compiler version.
-rw-r--r--kde-modules/KDECompilerSettings.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake
index 873ba992..6c45b7dd 100644
--- a/kde-modules/KDECompilerSettings.cmake
+++ b/kde-modules/KDECompilerSettings.cmake
@@ -275,6 +275,10 @@ endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.2.0")
+ message(FATAL_ERROR "GCC 4.2 or later is required")
+ endif()
+
# if (CMAKE_COMPILER_IS_GNUCC)
# _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs)
# set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES