A clang-format
plugin for the asdf version manager.
This plugin will try to install a binary build of clang-format from the official LLVM repository.
Failing that, it will try to build it from source. Building from source can also be forced by
setting the ASDF_CLANG_FORMAT_FORCE_SOURCE_INSTALL=1
environment variable.
bash
,curl
,tar
: generic POSIX utilities.- If building from source, a C++ compiler,
cmake
,make
, etc are required.
Plugin:
asdf plugin add clang-format https://github.com/FATMAP/asdf-clang-format.git
clang-format:
# Show all installable versions
asdf list-all clang-format
# Install specific version
asdf install clang-format latest
# Set a version globally (on your ~/.tool-versions file)
asdf global clang-format latest
# Now clang-format can be invoked from the shell
clang-format --version
Check asdf readme for more instructions on how to install & manage versions.
A following environment variables can affect this plugin:
ASDF_CLANG_FORMAT_FORCE_SOURCE_INSTALL
: Set to1
to force a source-based installation instead of using a pre-compiled binary, even if a binary release is available.
The plugin is based on work in asdf-community/asdf-cmake. Many thanks to the original authors of that project.
See LICENSE