The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=12633 ====================================================================== Reported By: hrogge Assigned To: ====================================================================== Project: CMake Issue ID: 12633 Category: CMake Reproducibility: always Severity: major Priority: normal Status: new ====================================================================== Date Submitted: 2011-12-18 14:11 EST Last Modified: 2011-12-18 14:11 EST ====================================================================== Summary: GCC fails some flags with "is valid for C++/ObjC++ but not for C" Description: GCC has some flags that are valid for C++, but not for C. The different warning message breaks the CHECK_C_COMPILER_FLAG macro.
Suggestion: add 'FAIL_REGEX "but not for C" # GNU' to CheckCCompilerFlag.cmake Steps to Reproduce: compile "int main(void) { return 0 };" on gcc 4.4.5 with -Wenum-compare: /usr/bin/gcc -Wenum-compare -o test.o -c test.c cc1: warning: command line option "-Wenum-compare" is valid for C++/ObjC++ but not for C Additional Information: Combined with ADD_DEFINITIONS(-Werror) this can break the build process. The CheckCCompilerFlag does not recognize that -Wenum-compare is not available, -Werror stops the build process. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2011-12-18 14:11 hrogge New Issue ====================================================================== -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers