View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0016038 | CMake | CMake | public | 2016-03-30 14:51 | 2016-06-10 14:21 | ||||
Reporter | Reid Kleckner | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | Windows | OS Version | ||||||
Product Version | CMake 3.4.3 | ||||||||
Target Version | CMake 3.6 | Fixed in Version | CMake 3.6 | ||||||
Summary | 0016038: CHECK_COMPILER_FLAG_COMMON_PATTERNS doesn't match clang-cl's unknown argument warning | ||||||||
Description | These are the patterns that cmake appears to be looking for to spot unsupported options: FAIL_REGEX "unknown .*option" # Clang FAIL_REGEX "optimization flag .* not supported" # Clang But we actually have two other diagnostics, one of which needs to be matched: def err_drv_unknown_argument : Error<"unknown argument: '%0'">; def warn_drv_unknown_argument_clang_cl : Warning< "unknown argument ignored in clang-cl: '%0'">, InGroup<UnknownArgument>; The first is an error diagnostic, so you don't need to match it. We added the second because MSVC ignores unknown flags, and clang-cl needs to do the same. We chose the text for consistency with the error diagnostic. | ||||||||
Steps To Reproduce | Have this in a cmake project: check_cxx_compiler_flag(-not-a-real-flag IS_REAL_FLAG) Configure the project with clang-cl as the compiler. Observe that IS_REAL_FLAG is ON. | ||||||||
Additional Information | This came up while I was trying to build asan with clang-cl. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0040774) Brad King (manager) 2016-03-31 08:56 |
Thanks. Please try this fix: Check*CompilerFlag: Add another pattern for Clang https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=17c4863c [^] |
(0040784) Reid Kleckner (reporter) 2016-03-31 14:03 |
Do you think a shorter pattern of just "unknown argument" would be better? |
(0040785) Brad King (manager) 2016-03-31 14:10 |
Many of the other matching expressions include the "ignored" part, so how about "unknown argument ignored": Check*CompilerFlag: Add another pattern for Clang https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fae80ee2 [^] ? |
(0040786) Reid Kleckner (reporter) 2016-03-31 19:35 |
Yep, sounds good. BTW, I checked out that commit, and it fixed the asan runtime build issues with clang-cl. Thanks! |
(0041206) Kitware Robot (administrator) 2016-06-10 14:21 |
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2016-03-30 14:51 | Reid Kleckner | New Issue | |
2016-03-31 08:56 | Brad King | Note Added: 0040774 | |
2016-03-31 08:56 | Brad King | Assigned To | => Brad King |
2016-03-31 08:56 | Brad King | Status | new => resolved |
2016-03-31 08:56 | Brad King | Resolution | open => fixed |
2016-03-31 08:56 | Brad King | Fixed in Version | => CMake 3.6 |
2016-03-31 08:56 | Brad King | Target Version | => CMake 3.6 |
2016-03-31 14:03 | Reid Kleckner | Note Added: 0040784 | |
2016-03-31 14:10 | Brad King | Note Added: 0040785 | |
2016-03-31 19:35 | Reid Kleckner | Note Added: 0040786 | |
2016-06-10 14:21 | Kitware Robot | Note Added: 0041206 | |
2016-06-10 14:21 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |