Permalink
Browse files

build: check GCC version

  • Loading branch information...
1 parent b6f8ae5 commit cb17e10b3010d3953b3a844624c006d7ff3ccb41 @aristidb aristidb committed Jun 8, 2009
Showing with 11 additions and 0 deletions.
  1. +11 −0 CMakeLists.txt
View
@@ -110,6 +110,17 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions("-Wno-long-long -ansi")
set(CMAKE_REQUIRED_FLAGS "")
+
+ check_cxx_source_compiles(
+ "#if __GNUC__ < 4 || __GNUC_MINOR__ < 2
+ #error \"GCC too old\"
+ #endif
+ int main() {}"
+ GCC_VERSION_OK)
+
+ if(NOT GCC_VERSION_OK)
+ message(FATAL_ERROR "GCC Version too old! Get a newer GCC.")
+ endif()
elseif(MSVC)
add_definitions("/W3 /wd4512 /wd4355 /wd4800 /wd4996 /wd4714 /EHa")
set(WINLIBS projects/windows/lib32)

0 comments on commit cb17e10

Please sign in to comment.