From 02be314e9c9f3cf27787c82358646b72a53c52d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 17 Feb 2014 22:00:55 +0100 Subject: [PATCH] Error out when compatibility branch is needed for particular compiler. --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 477226da7..0b669eb74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,6 +90,13 @@ if(BUILD_TESTS) enable_testing() endif() +# Check compiler compatibility +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.6.0") + message(FATAL_ERROR "Compatibility branch of Magnum is needed for use with GCC < 4.6. See the documentation for more information.") +elseif(MSVC) + message(FATAL_ERROR "Compatibility branch of Magnum is needed for use with MSVC. See the documentation for more information.") +endif() + # If targeting NaCl or Emscripten, set explicit OpenGL ES 2.0 support if(CORRADE_TARGET_NACL OR CORRADE_TARGET_EMSCRIPTEN) set(TARGET_GLES 1)