All Projects → Sarcasm → Compdb

Sarcasm / Compdb

Licence: mit
The compilation database Swiss army knife

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Compdb

Tre
LLVM backed progamming language (Go subset)
Stars: ✭ 100 (-34.21%)
Mutual labels:  clang
Llvm Utils
LLVM/Clang for Visual Studio 2019, 2017, 2015, 2013, 2012 and 2010. clang-cl for Python3 distutils. Utils for Clang Static Analyzer
Stars: ✭ 123 (-19.08%)
Mutual labels:  clang
Cppcoro
A library of C++ coroutine abstractions for the coroutines TS
Stars: ✭ 2,118 (+1293.42%)
Mutual labels:  clang
Cmakepchcompiler
CMake precompiled header support via custom PCH compiler extension
Stars: ✭ 105 (-30.92%)
Mutual labels:  clang
Bsodsurvivor
This project aims to facilitate debugging a kernel driver in windows by adding support for a code change on the fly without reboot/unload, and more!
Stars: ✭ 122 (-19.74%)
Mutual labels:  clang
Proton Clang
Proton Clang toolchains builds in the form of a continuously updating Git repository. Clone with --depth=1.
Stars: ✭ 126 (-17.11%)
Mutual labels:  clang
Violations Lib
Java library for parsing report files from static code analysis.
Stars: ✭ 94 (-38.16%)
Mutual labels:  clang
Tripledoggy
基于clang static analyzer的源码漏洞检测插件
Stars: ✭ 149 (-1.97%)
Mutual labels:  clang
Clang Format Hooks
Apply a coding style with clang-format only to new code added to an existing code base.
Stars: ✭ 122 (-19.74%)
Mutual labels:  clang
Compilescore
Visual Studio extension and standalone app for build times and compilation data visualization.
Stars: ✭ 135 (-11.18%)
Mutual labels:  clang
Moderncppci
This is an example of doing a Modern C++ project with CI
Stars: ✭ 109 (-28.29%)
Mutual labels:  clang
Vector
➿ A supercharged std::vector implementation (minus Allocator)
Stars: ✭ 118 (-22.37%)
Mutual labels:  clang
Gllvm
Whole Program LLVM: wllvm ported to go
Stars: ✭ 126 (-17.11%)
Mutual labels:  clang
Cppinsights
C++ Insights - See your source code with the eyes of a compiler
Stars: ✭ 1,382 (+809.21%)
Mutual labels:  clang
Clang Llvm Tutorial
clang & llvm examples, e.g. AST Interpreter, Function Pointer Analysis, Value Range Analysis, Data-Flow Analysis, Andersen Pointer Analysis, LLVM Backend...
Stars: ✭ 139 (-8.55%)
Mutual labels:  clang
Termux Ndk
android-ndk for termux
Stars: ✭ 91 (-40.13%)
Mutual labels:  clang
Metareflect
Metareflect is a lightweight reflection system for C++, based on LLVM and Clangs libtooling.
Stars: ✭ 125 (-17.76%)
Mutual labels:  clang
Arm Cmake Toolchains
CMake toolchain configurations for ARM
Stars: ✭ 148 (-2.63%)
Mutual labels:  clang
Toyclangplugin
Playing with Clang plugin system
Stars: ✭ 146 (-3.95%)
Mutual labels:  clang
Embedded Ide
IDE for C embedded development centered on bare-metal ARM systems
Stars: ✭ 127 (-16.45%)
Mutual labels:  clang

compdb: the compilation database Swiss army knife

.. contents:: :local:

Introduction

compdb_ is a command line tool to manipulates compilation databases. A compilation database is a database for compile options, it has records of which compile options are used to build the files in a project. An example of compilation database is the JSON Compilation Database_

compdb aims to make it easier for you to run tools on your codebase by spoon-feeding you the right compile options.

compdb is not so much about generating the initial compilation database, this, is left to other tools, such as cmake and ninja. It is only a glue between the initial compilation database and your tool(s).

Motivation

With the proliferation of Clang-based tools, it has become apparent that the compile options are no longer useful uniquely to the compiler.

Standalone tools such as clang-tidy_ or text editors with libclang_ integration have to deal with compile options.

Examples of such tools, dealing with compilation databases are: irony-mode_, rtags_ and ycmd_.

Based on this evidence, compdb came to life. A tool that has knowledge of the compile options and can share it both to inform the text editor and to run clang based tool from the shell.

Getting started

Installation


Install with pip_::

  pip install compdb

From Github, as user::

  pip install --user git+https://github.com/Sarcasm/compdb.git#egg=compdb


Generate a compilation database with header files

Assuming a build directory build/, containing a compile_commands.json, a new compilation database, containing the header files, can be generated with::

compdb -p build/ list > compile_commands.json

Running the tests


To run the tests, type::

  python -m tests

Or::

  tox --skip-missing-interpreters

For regression tests on a few open source projects::

  cd tests/regression/headerdb
  make [all|help]


Contribute
----------

Contributions are always welcome!

Try to be consistent with the actual code, it will ease the review.


License
-------

This project is licensed under the MIT License.
See LICENSE.txt for details.


Acknowledgments
---------------

* repo_: for its ubiquitous command line interface,
  which served as an inspiration
* scan-build_: for the clear Python package design
* git_: for the ``git-config`` API
* `julio.meroh.net`_: for the interesting article serie on `CLI design`_


.. _clang-tidy: http://clang.llvm.org/extra/clang-tidy/
.. _CLI design: https://julio.meroh.net/2013/09/cli-design-series-wrap-up.html
.. _compdb: https://github.com/Sarcasm/compdb
.. _git: https://git-scm.com/
.. _irony-mode: https://github.com/Sarcasm/irony-mode
.. _julio.meroh.net: https://julio.meroh.net/
.. _JSON Compilation Database: http://clang.llvm.org/docs/JSONCompilationDatabase.html
.. _libclang: http://clang.llvm.org/doxygen/group__CINDEX.html
.. _pip: https://pip.pypa.io/
.. _repo: https://gerrit.googlesource.com/git-repo/
.. _rtags: https://github.com/Andersbakken/rtags
.. _scan-build: https://github.com/rizsotto/scan-build
.. _ycmd: https://github.com/Valloric/ycmd
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].