Questions tagged [include-what-you-use]
7 questions
74
votes
4 answers
How can I use the tool 'Include What You Use' together with CMake to detect unused headers?
The tool Include What You Use can be used to detect unneeded headers. I am using CMake for my C++ software project. How can I instruct CMake to run Include What You Use automatically on the source files of my software project?

Erik Sjölund
- 10,690
- 7
- 46
- 74
1
vote
2 answers
Using IWYU fix_includes.py with CMake - more friendly instuctions
I have problem running tool fix_includes.py that automatically fixes up source files based on the include-what-you-use recommendations.
I have configured IWYU tool accordingly to the documentation:
downloaded IWYU version matching my Clang…

KamilPolok
- 21
- 6
1
vote
0 answers
Why does CMake + Include What You Use not print any output?
I have installed Include What You Use.
I cloned the repository, checked out tag 0.18 and compiled.
$ include-what-you-use -v
clang version 14.0.0 (Fedora 14.0.0-1.fc36)
Target: x86_64-redhat-linux-gnu
Thread model: posix
InstalledDir:…

steddy
- 146
- 1
- 9
0
votes
0 answers
include-what-you-use with cmake: path to exucutable of iwyu
In installed the tool "include-what-you-use", see here.
I use cmake and with the option
cmake -DCMAKE_CXX_INCLUDE_WHAT_YOU_USE = /path/to/iwyu_executable ..
Once I downloaded include-what-you-use from the link above, I can not find any executable…

Simon
- 325
- 1
- 6
0
votes
0 answers
IWYU failing/unclear output?
I recently installed include-what-you-use (IWYU) to try it out. I am on version include-what-you-use 0.12 based on clang version 9.0.1-10. (My OS is Ubuntu 20.04 on WSL1)
I tried to do a very simple example on a source code file, but it quickly…

Tyler Shellberg
- 1,086
- 11
- 28
0
votes
1 answer
send_file seems to pause the whole web server until the file is sent
When I press play on any song in the media listing it has to get sent a send_file... however whilst the send_file is in progress, the whole website freezes meaning that if this send_file happens and someone goes to the main page of the website,…

WhatTheClown
- 464
- 1
- 7
- 24
0
votes
1 answer
How to prohibit private includes to other libraries when using merged header placement
I am in favour of merged header placement for a C++ project layout because
of several reasons also mentioned in the proposal P1204R0. Also I am trying to adhere to the Pitchfork guidlines.
I am using CMake to define the libraries and also the…

Gabriel
- 8,990
- 6
- 57
- 101