Skip to content

A demo project for showcasing various methods to generate a compilation database for C++ projects and ensuring compatibility with tools like Clang.

License

Notifications You must be signed in to change notification settings

bc-lee/test-compilation-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

test-compilation-database

This repository demonstrates various ways to generate a compilation database for a C++ project. It serves as a test project to check compatibility with compilation database tools, such as different Clang tools.

1. Generating the compilation database in the raw directory

To generate the compilation database in the raw directory, simply run raw/tools/generate_compilation_database.sh. The output will be placed in the raw/out directory.

2. Generating the compilation database in the bazel directory

In the bazel directory, you'll find a simple Bazel project. There are two methods to generate the compilation database:

2.1. Running bazel/tools/generate_compilation_database.py

This script utilizes grailbio/bazel-compilation-database under the hood and adjusts the output paths to be relative to the project's root directory. The bazel project is already set up to use the grailbio/bazel-compilation-database tool.

2.2. Using kiron1/bazel-compile-commands

kiron1/bazel-compile-commands is a tool that generates a compilation database from Bazel without requiring modifications to the project's BUILD files. Build the tool and run it in the bazel directory.

About

A demo project for showcasing various methods to generate a compilation database for C++ projects and ensuring compatibility with tools like Clang.

Resources

License

Stars

Watchers

Forks