devel/include-what-you-use 0.27 FreeBSD
Tool for use with clang to analyze #includes in C and C++ source files
- System
- FreeBSD
- Repository
- FreeBSD ports
- Maintainer
- [email protected]
- Last update
- Commit
bbfe221ba5- License
- NCSA
- Categories
- devel
- Package size
- 662.3 KiB, 8898.2 KiB installed
Description
"Include what you use" means this: for every symbol (type, function, variable, or macro) that you use in foo.cc (or foo.cpp), either foo.cc or foo.h should include a .h file that exports the declaration of that symbol. (Similarly, for foo_test.cc, either foo_test.cc or foo.h should do the including.) Obviously symbols defined in foo.cc itself are excluded from this requirement.
This puts us in a state where every file includes the headers it needs to declare the symbols that it uses. When every file includes what it uses, then it is possible to edit any file and remove unused headers, without fear of accidentally breaking the upwards dependencies of that file. It also becomes easy to automatically track and update dependencies in the source code.
In the other systems
| System | Port | Version |
|---|---|---|
| FreeBSD | devel/include-what-you-use | 0.27 |
| OpenBSD | devel/include-what-you-use | 0.26 |
| NetBSD | devel/include-what-you-use | 0.25 |
| HardenedBSD | devel/include-what-you-use | 0.26 |
Install
Binary package:
pkg install include-what-you-use
From the ports tree:
cd /usr/ports/devel/include-what-you-use/ && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= include-what-you-use>0:devel/include-what-you-use
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 0.27 | 0.27 | 0.18_1 | 0.24 | 0.27 |
| FreeBSD:14:quarterly | 0.27 | 0.27 | n/a | 0.24 | 0.27 |
| FreeBSD:15:latest | 0.27 | 0.27 | n/a | 0.24 | 0.24 |
| FreeBSD:15:quarterly | 0.27 | 0.27 | n/a | n/a | n/a |
| FreeBSD:16:latest | 0.26 | 0.27 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependencies
The Makefile names none itself; they come from USES and USE_*.
The full lists below include those, and their dependencies in turn.
Build dependencies 18
Run dependencies 10
No port depends on this one.
Configuration
No options to configure.
- USES
- cmake llvm:23,build,run ncurses python:run shebangfix
- Service scripts
- none
Files
Manual pages 1
- include-what-you-use(1)
pkg-plist 18
- bin/fix_includes.py
- bin/include-what-you-use
- bin/iwyu_tool.py
- share/man/man1/include-what-you-use.1.gz
- share/include-what-you-use/boost-1.64-all-private.imp
- share/include-what-you-use/boost-1.64-all.imp
- share/include-what-you-use/boost-1.75-all-private.imp
- share/include-what-you-use/boost-1.75-all.imp
- share/include-what-you-use/boost-all-private.imp
- share/include-what-you-use/boost-all.imp
- share/include-what-you-use/clang-22.intrinsics.imp
- share/include-what-you-use/clang-6.intrinsics.imp
- share/include-what-you-use/gcc-8.intrinsics.imp
- share/include-what-you-use/python2.7.imp
- share/include-what-you-use/python3.8.imp
- share/include-what-you-use/qt4.imp
- share/include-what-you-use/qt5_11.imp
- share/include-what-you-use/qt5_4.imp
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| include-what-you-use-include-what-you-use-0.27_GH0.tar.gz | 1.198114e+06 | 982680d5ee25826fe7dd60d4ec4f2ac7d8f99b545d6a680b77de9e083278357f |