Commit 53fb07ef authored by Brad King's avatar Brad King
Browse files

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.
parent 6362d4c7
......@@ -21,6 +21,7 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
# Some compilers do not fail with a bad flag
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}")
ENDMACRO (CHECK_C_COMPILER_FLAG)
......
......@@ -21,6 +21,7 @@ MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
# Some compilers do not fail with a bad flag
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}")
ENDMACRO (CHECK_CXX_COMPILER_FLAG)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment