[cmake-developers] [CMake 0015724]: Unable to specify iwyu options

Mantis Bug Tracker mantis at public.kitware.com
Wed Sep 2 19:41:12 EDT 2015


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15724 
====================================================================== 
Reported By:                Jeremie Delaitre
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15724
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-09-03 11:41 NZST
Last Modified:              2015-09-03 11:41 NZST
====================================================================== 
Summary:                    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)

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-09-03 11:41 Jeremie DelaitreNew Issue                                    
======================================================================



More information about the cmake-developers mailing list