A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/tee3/commands_to_compilation_database below:

tee3/commands_to_compilation_database: A program to generate a compilation database from compilation commands.

Commands to Compilation Database

This is a program to generate a compilation database from the output of a build tool. It has built in support for the output of the clang toolset for Boost.Build, simple make, and provides a mechanism to specify the regular expression to match a compiler command.

There is a Python version and a C++ version.

There is a program to generate a compilation database from a list of files on the standard input. Compiler flags can be given on the comamnd line.

This is a work in progress and has not been widely tested.

It has been tested with Boost.Build on Linux and OS X (not tested on Windows yet).

The following is a minimum that needs to be tested.

Many build tools provide an option to print the commands taken and this program will take this as input and create a compilation database from it. This is useful with build systems that do not have native support for generating compilation databases.

To show the options, run the following commands.

commands_to_compilation_database_py --help
commands_to_compilation_database_cpp --help

The simplest usage is to pipe the output from the compilation to the program. The following command shows the usage with Boost.Build by forcing the tool to generate all targets and dry-running the build (which prints the commands).

b2 -a -n | commands_to_compilation_database_py --build-tool=Boost.Build

If the build tool provides a mechanism to output the compilation commands while running, the compilation database can be updated incrementally on each build as shown below for Boost.Build.

b2 -d+2 | tee | commands_to_compilation_database_py --build-tool=Boost.Build --incremental

To show the options, run the following commands.

files_to_compilation_database_py --help
files_to_compilation_database_cpp --help

The simplest usage is to pipe a list of filenames to the program. The following command shows the usage with Git to generate the list of C and C++ source and header filenames.

git ls-files *.[ch] *.[ch]pp | \
    files_to_compilation_database_py \
    --cflags="-std=c89" \
    --cxxflags="-std=c++11" \
    --include=include/dir1 \
    --include=include/dir2

Run the following command to build and test the system.

b2

Run the following command to install the system to the /usr/local prefix.

b2 --prefix=/usr/local install

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4