Fixed GCC version checking in cmake
authorSzilard Pall <pszilard@cbr.su.se>
Sun, 20 Jun 2010 22:36:43 +0000 (00:36 +0200)
committerSzilard Pall <pszilard@cbr.su.se>
Sun, 20 Jun 2010 22:36:43 +0000 (00:36 +0200)
cmake/gmxCheckGCCVersion.cmake

index 0e386381d0dfe5cc91d7515a73e2d5975d0cc052..70e0764d11637a9c07fafab0fd9bb9c2c072ca3f 100644 (file)
@@ -21,7 +21,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
         OUTPUT_STRIP_TRAILING_WHITESPACE)
     # if gcc returned with error the -dumpversion is not available 
     if(${_gcc_dumpversion_res} EQUAL 0)
-        if(${_gcc_dumpversion_out} MATCHES ".*4\\.1.*")
+        if(${_gcc_dumpversion_out} MATCHES ".*4\\.1\\.[0-9]+.*")
             message(FATAL_ERROR " The GCC compiler in use seems to belong to the 4.1.x 
                 family (detected version: ${_gcc_dumpversion_out}). These compilers 
                 contain an optimization related bug which might results in code that 
@@ -34,7 +34,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
         execute_process(COMMAND ${CMAKE_C_COMPILER} --version
             OUTPUT_VARIABLE _gcc_version_out
             OUTPUT_STRIP_TRAILING_WHITESPACE)            
-        if("${_gcc_version_out}" MATCHES ".*4\\.1.*")        
+        if("${_gcc_version_out}" MATCHES ".*4\\.1\\.[0-9]+.*")
             message(FATAL_ERROR " The GCC compiler in use seems to belong to the 4.1.x 
                 family. These compiler  compilers contain an optimization related bug 
                 which might results in code that exhibits incorrect behaviour and