MantisBT - CMake
View Issue Details
0013294CMakeModulespublic2012-06-12 12:322012-11-05 14:33
Matthias Kretz 
Brad King 
normalfeaturealways
closedfixed 
CMake 2.8.7 
CMake 2.8.9CMake 2.8.9 
0013294: patch to CheckC(XX)CompilerFlag.cmake to match ICC output
The Intel compiler reports #10159 if you pass "-std=c++11", which it doesn't support yet.

diff --git a/cmake/CheckCCompilerFlag.cmake b/cmake/CheckCCompilerFlag.cmake
index 9e698b2..3c904dd 100644
--- a/cmake/CheckCCompilerFlag.cmake
+++ b/cmake/CheckCCompilerFlag.cmake
@@ -36,6 +36,7 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
      FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
      FAIL_REGEX "command option .* is not recognized" # XL
      FAIL_REGEX "WARNING: unknown flag:" # Open64
+ FAIL_REGEX " #10159: " # ICC
      )
    SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
 ENDMACRO (CHECK_C_COMPILER_FLAG)
diff --git a/cmake/CheckCXXCompilerFlag.cmake b/cmake/CheckCXXCompilerFlag.cmake
index b016cae..fccc97b 100644
--- a/cmake/CheckCXXCompilerFlag.cmake
+++ b/cmake/CheckCXXCompilerFlag.cmake
@@ -36,6 +36,7 @@ MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
      FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
      FAIL_REGEX "command option .* is not recognized" # XL
      FAIL_REGEX "WARNING: unknown flag:" # Open64
+ FAIL_REGEX " #10159: " # ICC
      )
    SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
 ENDMACRO (CHECK_CXX_COMPILER_FLAG)
check_cxx_compiler_flag("-std=bogus" test)

test should be FALSE
No tags attached.
duplicate of 0012576closed Rolf Eike Beer CHECK_C_COMPILER_FLAG is inflexible for FAIL_REGEX 
Issue History
2012-06-12 12:32Matthias KretzNew Issue
2012-06-12 13:24Brad KingNote Added: 0029666
2012-06-12 14:43Matthias KretzNote Added: 0029667
2012-06-12 14:43Matthias KretzNote Added: 0029668
2012-06-12 16:39Brad KingRelationship addedduplicate of 0012576
2012-06-12 16:40Brad KingNote Added: 0029672
2012-06-12 16:40Brad KingAssigned To => Brad King
2012-06-12 16:40Brad KingStatusnew => resolved
2012-06-12 16:40Brad KingResolutionopen => fixed
2012-06-12 16:40Brad KingFixed in Version => CMake 2.8.9
2012-06-12 16:40Brad KingTarget Version => CMake 2.8.9
2012-11-05 14:33David ColeNote Added: 0031451
2012-11-05 14:33David ColeStatusresolved => closed

Notes
(0029666)
Brad King   
2012-06-12 13:24   
What version of the Intel compiler is this and on what platform?
What is the full output from the compiler?
(0029667)
Matthias Kretz   
2012-06-12 14:43   
ICC version is 12.1.3 20120212
The full output is: "command line warning #10159: invalid argument for option '-std'"
(0029668)
Matthias Kretz   
2012-06-12 14:43   
ah sorry, Linux. More specifically Kubuntu 12.04.
(0029672)
Brad King   
2012-06-12 16:40   
This case is handled already by a change for issue 0012576:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f621ead8 [^]
(0031451)
David Cole   
2012-11-05 14:33   
Closing resolved issues that have not been updated in more than 4 months.