[Cmake-commits] [cmake-commits] king committed CheckCCompilerFlag.cmake 1.4 1.5 CheckCXXCompilerFlag.cmake 1.3 1.4

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Sep 17 17:16:45 EDT 2009


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv19134/Modules

Modified Files:
	CheckCCompilerFlag.cmake CheckCXXCompilerFlag.cmake 
Log Message:
Fix CHECK_(C|CXX)_COMPILER_FLAG for HP

This compiler warns and returns 0 for unrecognized flags.  We fix the
compiler flag check macros by looking for a warning in the output.
See issue #9516.


Index: CheckCCompilerFlag.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CheckCCompilerFlag.cmake,v
retrieving revision 1.4
retrieving revision 1.5
diff -C 2 -d -r1.4 -r1.5
*** CheckCCompilerFlag.cmake	17 Sep 2009 19:32:54 -0000	1.4
--- CheckCCompilerFlag.cmake	17 Sep 2009 21:16:43 -0000	1.5
***************
*** 22,25 ****
--- 22,26 ----
       FAIL_REGEX "unrecognized option"                       # GNU
       FAIL_REGEX "ignoring unknown option"                   # MSVC
+      FAIL_REGEX "[Uu]nknown option"                         # HP
       )
     SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")

Index: CheckCXXCompilerFlag.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CheckCXXCompilerFlag.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** CheckCXXCompilerFlag.cmake	17 Sep 2009 19:32:54 -0000	1.3
--- CheckCXXCompilerFlag.cmake	17 Sep 2009 21:16:43 -0000	1.4
***************
*** 22,25 ****
--- 22,26 ----
       FAIL_REGEX "unrecognized option"                       # GNU
       FAIL_REGEX "ignoring unknown option"                   # MSVC
+      FAIL_REGEX "[Uu]nknown option"                         # HP
       )
     SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")



More information about the Cmake-commits mailing list