Fix cmake error if compiler starts with blank line
authorRoland Schulz <roland@utk.edu>
Sat, 3 Nov 2012 01:48:36 +0000 (21:48 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 6 Nov 2012 20:41:45 +0000 (21:41 +0100)
Change-Id: Id6579e4c7260fe9359ae43f9931662b29a17e7b9

CMakeLists.txt

index 625485af26a83cd3e99279f55a2f818fe39025c3..2a608f1f82b57cdcd5b874e5a65490ead0b2c6ef 100644 (file)
@@ -1078,7 +1078,7 @@ if(TMP_RESULT)
 endif()
 string(LENGTH "${CC_VERSION}" len)
 if(len)
-    string(REGEX MATCH "[^\n]*" CC_VERSION "${CC_VERSION}")
+    string(REGEX MATCH "[^\n]+" CC_VERSION "${CC_VERSION}")
 endif()
 
 set(BUILD_COMPILER "@CMAKE_C_COMPILER@ @CMAKE_C_COMPILER_ID@ @CC_VERSION@")