| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0015724 | CMake | CMake | public | 2015-09-02 19:41 | 2016-02-01 09:10 | ||||
| Reporter | Jeremie Delaitre | ||||||||
| Assigned To | Bill Hoffman | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||
| Status | closed | Resolution | no change required | ||||||
| Platform | linux | OS | fedora | OS Version | 22 | ||||
| Product Version | CMake 3.3 | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0015724: Unable to specify iwyu options | ||||||||
| Description | I am trying the new include-what-you-use support of CMake (3.3.0). It is working fine when I just run iwyu, but I'd like to specify some additional options (most importantly "-Xiwyu --mapping-file=..."). I could not find a way to make it work. I tried to specify the options with: set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "/usr/bin/iwyu -Xiwyu --mapping-file=...") without success (I tried other iwyu options too). The command line generated looks like: FAILED: /usr/bin/cmake -E __run_iwyu --iwyu="/usr/bin/include-what-you-use -Xiwyu --mapping_file=<path-to-mapping-file>" -- <path-to-compiler>/g++ --sysroot=<path-to-sysroot> <other compiler options> <file to compile> Error running '/usr/bin/include-what-you-use -Xiwyu --mapping_file="<path-to-mapping-file>"': No such file or directory I tried to change the command by hand (e.g. moving the iwyu option after the "--") but it did not work neither. Any hint? | ||||||||
| Additional Information | - CMake 3.3.0 - include-what-you-use 0.3 based on clang version 3.5.0 (tags/RELEASE_350/final) | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0039369) Bill Hoffman (manager) 2015-09-03 13:22 |
http://www.cmake.org/cmake/help/v3.3/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE.html [^] "Specify a ;-list containing a command line for the include-what-you-use tool." So, this should work: set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "/usr/bin/iwyu;-Xiwyu;--mapping-file=...") |
|
(0039370) Brad King (manager) 2015-09-03 13:31 |
The set() command constructs a ;-list from its arguments so one can simply write: set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE /usr/bin/iwyu -Xiwyu --mapping-file=...) |
|
(0039371) Jeremie Delaitre (reporter) 2015-09-03 17:19 |
Both way actually works! The only one not working was the one I was using (i.e. quoting the whole command, using spaces to separate args). I did not quite understand the documentation, ";-list" was not very meaningful for me (next time, I'll read the linked page more carefully...), but now I understand what you meant! Sorry for the noise. |
|
(0040389) Robert Maynard (manager) 2016-02-01 09:10 |
Closing resolved issues that have not been updated in more than 4 months. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2015-09-02 19:41 | Jeremie Delaitre | New Issue | |
| 2015-09-03 13:18 | Bill Hoffman | Assigned To | => Bill Hoffman |
| 2015-09-03 13:18 | Bill Hoffman | Status | new => assigned |
| 2015-09-03 13:22 | Bill Hoffman | Note Added: 0039369 | |
| 2015-09-03 13:31 | Brad King | Note Added: 0039370 | |
| 2015-09-03 17:19 | Jeremie Delaitre | Note Added: 0039371 | |
| 2015-09-08 09:31 | Brad King | Status | assigned => resolved |
| 2015-09-08 09:31 | Brad King | Resolution | open => no change required |
| 2016-02-01 09:10 | Robert Maynard | Note Added: 0040389 | |
| 2016-02-01 09:10 | Robert Maynard | Status | resolved => closed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |