Issue 1082 in include-what-you-use: Feature Request: Support for CMake 3.24.0 CMAKE VERIFY INTERFACE HEADER SETS

4 views
Skip to first unread message

notifi...@include-what-you-use.org

unread,
Jul 14, 2022, 2:48:53 PM7/14/22
to include-wh...@googlegroups.com
New issue 1082 by danielh2942: Feature Request: Support for CMake 3.24.0 CMAKE_VERIFY_INTERFACE_HEADER_SETS
https://github.com/include-what-you-use/include-what-you-use/issues/1082

I have been using the new CMake ```VERIFY_INTERFACE_HEADER_SETS``` argument as I am trying to get headers to have the correct includes

the way it works is by creating a new target
```targetname_verify_interface_header_sets``` where each header is given a sourcefile of the pattern ```headername.h.cxx```

I ran IWYU on this new target and all I got was
```
/path/to/lib/target_verify_interface_header_sets/target/foo.h.cxx should add these lines:

/path/to/lib/target_verify_interface_header_sets/target/foo.h.cxx should remove these lines:
- #include <target/foo.h> // lines 1-1

The full include-list for /path/to/lib/target_verify_interface_header_sets/target/foo.h.cxx:
---
```
is there some argument I'm missing?
my invocation is as follows
```
/usr/local/bin/iwyu_tool.py \
--jobs $(nproc) \
-p ${BUILD_DIR} \
-- -Xiwyu --mapping_file=/path/mappings.imp \
-Xiwyu --keep="pch.*" \
-Xiwyu --cxx17ns \
-Xiwyu --quoted_includes_first \
-Xiwyu --update_comments \
-Xiwyu --comment_style="long" \
-Xiwyu --max_line_length=120
```

Sorry if this is a silly question/request that is down to me using a misconfigured iwyu instance
thanks in advance!


notifi...@include-what-you-use.org

unread,
Jul 16, 2022, 10:09:39 AM7/16/22
to include-wh...@googlegroups.com
Comment #1 on issue 1082 by kimgr: Feature Request: Support for CMake 3.24.0 CMAKE_VERIFY_INTERFACE_HEADER_SETS
https://github.com/include-what-you-use/include-what-you-use/issues/1082

What is `VERIFY_INTERFACE_HEADER_SETS` supposed to do? Does it just generate an empty `.cxx` file containing include directives for the headers to be verified (which shows that they can compile stand-alone, I suppose)?

If so, there's no need to run IWYU on these source files -- they never use any symbols, and so all `#include`s will be suggested for removal. But maybe I'm misunderstanding what's going on here.


Reply all
Reply to author
Forward
0 new messages