Fix CheckCXXCompilerFlag
authorRoland Schulz <roland@utk.edu>
Sun, 9 Mar 2014 01:00:49 +0000 (20:00 -0500)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 11 Mar 2014 01:44:51 +0000 (02:44 +0100)
ICC on Windows was always failing the CheckCXXCompilerFlag.
This was caused by the warning:
LINK : warning LNK4224: /INCREMENTAL:YES is no longer supported;  ignored
being matched by the compiler fail_regex for aix because of a missing
escale for the semicolon. A single escape isn't sufficient. Using double
escape ("\\\;") doesn't produce this problem, but I'm not sure whether it
always matches correctly thus instead a "." is used (works because it is
a regex). This fix doesn't address either the fact that the deprecated
linker flag is used nor does it address the problem that if incorrect
flags are somehow added (either by cmake or the user), this macro
fails without a diagnosible error message or fatal error (to notice it).

Change-Id: Ia45d6cd4fbf4f464bcb03e0d945085987a97aaad

cmake/CheckCXXCompilerFlag.cmake

index e589fddf06f697ab47b864fbd8b990a047182249..660f5aaa62f591b46996e3f3c4afe66e5904f0ac 100644 (file)
@@ -64,7 +64,7 @@ MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
      FAIL_REGEX "[Uu]nknown option"                         # HP
      FAIL_REGEX "[Ww]arning: [Oo]ption"                     # SunPro
      FAIL_REGEX "command option .* is not recognized"       # XL
-     FAIL_REGEX "not supported in this configuration; ignored"       # AIX
+     FAIL_REGEX "not supported in this configuration. ignored"       # AIX
      FAIL_REGEX "File with unknown suffix passed to linker" # PGI
      FAIL_REGEX "WARNING: unknown flag:"                    # Open64
      )