clang-tags – Installation guide
Table of Contents
1 Requirements
cmake- a C++11 compiler (e.g.
g++orclang++) boost(at least thesystemandasiocomponents)jsoncpplibclang(>= 3.0)sqlite3socatstracepython(>= 2.3)- a version newer than 2.7 is recommended to benefit from the more recent
argparsemodule.
- a version newer than 2.7 is recommended to benefit from the more recent
The following are recommended:
git: to get the latest versionpkg-config: helps finding other requirementsemacs: obviously required for the Emacs interface
And here are a few suggested packages:
doxygen: required to build the developer documentationorg-mode: required to build user documentation
2 Building
clang-tags uses CMake as a build system.
Provided that the dependencies are installed (in standard locations), a complete build and test process should be as simple as:
cmake path/to/sources make make test
As an example, here is an installation procedure which has been tested on a fresh Debian Jessie system:
# Install dependencies su -c "apt-get install build-essential git cmake pkg-config \ libboost-system-dev libjsoncpp-dev \ libclang-dev libsqlite3-dev socat \ strace emacs" # Get clang-tags sources mkdir clang-tags && cd clang-tags git clone https://github.com/ffevotte/clang-tags.git src # Create a build directory mkdir build && cd build # Configure the project cmake ../src # Build and run tests make make test
3 Testing and using without installing
It is possible to use clang-tags immediately after the build, without
properly installing it on the system. Two environment setup scripts are
generated during the build to help in this respect:
- setup the shell environment:
env.shappropriately sets the required environment variables, such asPATH:source env.sh - setup script for Emacs:
env.elsets the required environment variables and loads theclang-tags.ellibrary. You can either:- load it interactively:
M-x load-file RET /path/to/build/env.el RET - or put the following in your Emacs initialization file
(
~/.emacs.d/init.elor~/.emacs):(load-file "/path/to/build/env.el")
Now would be a good time to proceed to the quick start guide or the user manual to ger started using
clang-tags. - load it interactively:
4 Installing
Running make install in the build directory should install clang-tags, but
this has not been tested much yet. For now, it is safer to follow the
instructions in the previous section.