Format ModuleΒΆ

Module adding a format CMake target to automatically format modified source files using clang-format.

To add the target to a project include this module in the root CMakeLists.txt.

include(Format)

Users can run the target to format modified files like so:

$ ninja format
[0/1] clang-format modified source files.

See also

Implemented using the FindGitClangFormat Module and ClangTools::clang-format executable discovered by FindClangTools Module.