MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0013194 | CMake | Modules | public | 2012-05-05 14:38 | 2016-06-10 14:31 |
Reporter | Jared Boone | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | OS | MacOS X | OS Version | 10.7.3 | |
Product Version | CMake 2.8.7 | ||||
Target Version | Fixed in Version | ||||
Summary | 0013194: Clang compiler flag detection incorrectly reports "Success" | ||||
Description | I recently tried compiling GNU Radio (3.6.1-ish development branch) and ran into trouble when CMake was detecting compiler flags relating to instruction sets. It turns out that Clang reports "unused arguments" as warnings, and the message is not presently matched in Modules/CheckCXXCompilerFlag.cmake. | ||||
Steps To Reproduce | The command line executed by CheckCXXCompilerFlag: /usr/bin/c++ -Dhave_maltivec -maltivec -o CMakeFiles/cmTryCompileExec.dir/src.cxx.o -c /Users/jboone/tmp/gnuradio/build/volk/CMakeFiles/CMakeTmp/src.cxx When I run the test on my Intel Mac using my own src.cxx ("int main() { return 0; }"), I get: clang: warning: argument unused during compilation: '-maltivec' This warning will not be detected by the current CheckCXXCompilerFlags.cmake: From http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CheckCXXCompilerFlag.cmake;hb=HEAD [^] # Some compilers do not fail with a bad flag FAIL_REGEX "command line option .* is valid for .* but not for C\\\\+\\\\+" # GNU FAIL_REGEX "unrecognized .*option" # GNU FAIL_REGEX "unknown .*option" # Clang FAIL_REGEX "ignoring unknown option" # MSVC FAIL_REGEX "warning D9002" # MSVC, any lang FAIL_REGEX "option.*not supported" # Intel FAIL_REGEX "invalid argument .*option" # Intel FAIL_REGEX "ignoring option .*argument required" # Intel 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 "File with unknown suffix passed to linker" # PGI FAIL_REGEX "WARNING: unknown flag:" # Open64 I was able to solve the problem by adding one line to the list of FAIL_REGEXs: FAIL_REGEX "argument unused during compilation" # Clang | ||||
Additional Information | I'm using MacOS X 10.7.3 with Xcode 4.3.2. I have MacPorts installed, but have removed all MacPorts gcc, llvm, and cctools packages, to ensure I'm working with the Xcode Clang. $ /usr/bin/cc -v Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) Target: x86_64-apple-darwin11.3.0 Thread model: posix $ /usr/bin/c++ -v Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) Target: x86_64-apple-darwin11.3.0 Thread model: posix $ ls -l /usr/bin/cc lrwxr-xr-x 1 root wheel 5 Apr 18 22:05 /usr/bin/cc -> clang $ ls -l /usr/bin/c++ lrwxr-xr-x 1 root wheel 7 Apr 18 22:05 /usr/bin/c++ -> clang++ | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2012-05-05 14:38 | Jared Boone | New Issue | |||
2012-05-05 17:24 | Rolf Eike Beer | Note Added: 0029404 | |||
2012-05-05 17:24 | Rolf Eike Beer | Assigned To | => Rolf Eike Beer | ||
2012-05-05 17:24 | Rolf Eike Beer | Status | new => resolved | ||
2012-05-05 17:24 | Rolf Eike Beer | Resolution | open => fixed | ||
2012-05-05 17:24 | Rolf Eike Beer | Fixed in Version | => CMake 2.8.9 | ||
2012-05-05 17:24 | Rolf Eike Beer | Target Version | => CMake 2.8.9 | ||
2012-05-17 13:58 | David Cole | Note Added: 0029501 | |||
2012-05-17 13:58 | David Cole | Status | resolved => feedback | ||
2012-05-17 13:58 | David Cole | Resolution | fixed => reopened | ||
2012-05-17 14:08 | Jared Boone | Note Added: 0029503 | |||
2012-05-17 14:08 | Jared Boone | Status | feedback => assigned | ||
2012-05-17 14:10 | David Cole | Note Added: 0029504 | |||
2012-06-04 15:32 | David Cole | Fixed in Version | CMake 2.8.9 => | ||
2012-06-05 14:36 | David Cole | Note Added: 0029615 | |||
2012-06-16 08:23 | David Cole | Note Added: 0029708 | |||
2012-07-09 07:13 | David Cole | Note Added: 0029988 | |||
2012-07-09 07:21 | David Cole | Target Version | CMake 2.8.9 => | ||
2012-08-10 09:19 | Brad King | Note Added: 0030206 | |||
2012-09-03 17:04 | Rolf Eike Beer | Assigned To | Rolf Eike Beer => | ||
2012-09-03 17:04 | Rolf Eike Beer | Status | assigned => backlog | ||
2016-06-10 14:28 | Kitware Robot | Note Added: 0042040 | |||
2016-06-10 14:28 | Kitware Robot | Status | backlog => resolved | ||
2016-06-10 14:28 | Kitware Robot | Resolution | reopened => moved | ||
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|