MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0015526 | CMake | Modules | public | 2015-04-21 19:37 | 2015-11-02 09:13 |
Reporter | Dan Kegel | ||||
Assigned To | Brad King | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Apple Mac | OS | OS X | OS Version | 10.4.10 |
Product Version | CMake 3.2.2 | ||||
Target Version | CMake 3.3 | Fixed in Version | CMake 3.3 | ||
Summary | 0015526: check_c_compiler_flag does not recognize some Clang messages | ||||
Description | Per http://stackoverflow.com/questions/26108606/no-support-to-finline-functions-in-clang-3-5 [^] XCode 6 has dropped support for -finline-functions: $ clang -finline-functions -c foo.c -Werror clang: error: optimization flag '-finline-functions' is not supported so projects that use -Werror must not use that flag. But check_c_compiler_flag doesn't use -Werror, and the output: $ clang -finline-functions -c foo.c clang: warning: optimization flag '-finline-functions' is not supported clang: warning: argument unused during compilation: '-finline-functions' sails right by its regex, so the flag is listed as supported. D'oh. | ||||
Steps To Reproduce | $ cat CMakeLists.txt cmake_minimum_required(VERSION 2.8.12) include(CheckCCompilerFlag) check_c_compiler_flag(-finline-functions FOOBARC) include(CheckCXXCompilerFlag) check_cxx_compiler_flag(-finline-functions FOOBARCXX) $ cmake -- The C compiler identification is AppleClang 6.1.0.6020049 -- The CXX compiler identification is AppleClang 6.1.0.6020049 -- Performing Test FOOBARC -- Performing Test FOOBARC - Success -- Performing Test FOOBARCXX -- Performing Test FOOBARCXX - Success But I expected 'Failed', not success, as that flag is not really supported and will cause build error if used with -Werror. | ||||
Additional Information | Patch sent to cmake-developers, but I guess I'm not subscribed yet, so I'll attach it here too. Also affects older versions of cmake. | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | opt.patch (1,498) 2015-04-21 19:37 https://public.kitware.com/Bug/file/5437/opt.patch opt3.patch (845) 2015-04-22 10:55 https://public.kitware.com/Bug/file/5438/opt3.patch | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2015-04-21 19:37 | Dan Kegel | New Issue | |||
2015-04-21 19:37 | Dan Kegel | File Added: opt.patch | |||
2015-04-21 20:00 | Dan Kegel | Note Added: 0038576 | |||
2015-04-21 20:13 | Dan Kegel | Note Deleted: 0038576 | |||
2015-04-22 09:54 | Brad King | Note Added: 0038579 | |||
2015-04-22 09:54 | Brad King | Summary | check_c_compiler_flag gives wrong answer on Mac => check_c_compiler_flag not implemented for Xcode 6.3 | ||
2015-04-22 09:55 | Brad King | Assigned To | => Brad King | ||
2015-04-22 09:55 | Brad King | Status | new => assigned | ||
2015-04-22 09:55 | Brad King | Target Version | => CMake 3.3 | ||
2015-04-22 10:48 | Dan Kegel | Note Added: 0038582 | |||
2015-04-22 10:55 | Dan Kegel | File Added: opt3.patch | |||
2015-04-22 10:56 | Brad King | Note Added: 0038583 | |||
2015-04-22 11:05 | Dan Kegel | Note Added: 0038584 | |||
2015-04-22 11:08 | Brad King | Summary | check_c_compiler_flag not implemented for Xcode 6.3 => check_c_compiler_flag does not recognize some Clang messages | ||
2015-04-22 12:55 | Brad King | Note Added: 0038585 | |||
2015-04-22 12:55 | Brad King | Status | assigned => resolved | ||
2015-04-22 12:55 | Brad King | Resolution | open => fixed | ||
2015-04-22 12:55 | Brad King | Fixed in Version | => CMake 3.3 | ||
2015-11-02 09:13 | Robert Maynard | Note Added: 0039787 | |||
2015-11-02 09:13 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|