timo0 / homebrew-iwyu

Use the Homebrew package manager to easily install include-what-you-use

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Homebrew IWYU

Build Status Release License

This formula makes it easy to install include-what-you-use on any modern OS X system.

Just brew tap jasonmp85/iwyu and then brew install iwyu.

Using iwyu

The project's page goes into more detail, but there are three basic ways to use iwyu

Directly

Invoke it on a single file, as you would a compiler: iwyu hello_world.c. Messages about what includes to add or remove will be printed to standard output.

From make

Tell make to use it as the C compiler: make -k CC=iwyu. It's necessary to use the -k flag to continue after errors (iwyu always errors to signal that no compilation has actually taken place).

Using fix_include

include-what-you-use bundles a Python script capable of parsing its output in order to automatically fix any include problems, in-place if you desire. It's not perfect, but something like fix_include hello_world.c < iwyu hello_world.c should work to update a file named hello_world.c with the suggestions made by iwyu.

Copyright

Copyright © 2014–2016 Jason Petersen

Code released under the MIT License.

About

Use the Homebrew package manager to easily install include-what-you-use

License:MIT License


Languages

Language:Ruby 100.0%