Metadata-Version: 2.1
Name: scons-compiledb
Version: 0.2.2
Summary: compile_commands.json generation for SCons build system
Home-page: https://github.com/pinetr2e/scons-compiledb
Author: Hans Jang
Author-email: hsjang8848@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Environment :: Console
Classifier: Topic :: Software Development
Description-Content-Type: text/markdown

[![Build Status](https://travis-ci.org/pinetr2e/scons-compiledb.svg?branch=master)](https://travis-ci.org/pinetr2e/scons-compiledb)
[![PyPI version](https://badge.fury.io/py/scons-compiledb.svg)](https://badge.fury.io/py/scons-compiledb)
# SCons Compilation DB support


scons-compiledb adds a support for generating JSON formatted compilation
database defined by
[Clang](https://clang.llvm.org/docs/JSONCompilationDatabase.html).

The main functionality of scons-compiledb is based on the version in
[MongoDB](https://github.com/mongodb/mongo/blob/master/site_scons/site_tools/compilation_db.py).

Features:

- Multiple construction environments support.
- Merging of compile_commands.json.
- Simple customisation for DB entry generation.
- DB generation with --compiledb command line option.
- Installation with PyPI



## Installation

Install and update using `pip`
```
pip install scons-compiledb
```

## Usage

In Scons script, enable generation:

```python
import scons_compiledb

env = DefaultEnvironment()  # Or with any other way
scons_compiledb.enable_cmdline(env)
#
# ... Use env normnally ...
#
```

Generate compile_commands.json by invoking SCons with --compiledb command line option:
```
$ scons --compiledb

...
Check compilation DB : compile_commands.json.pickle
Update compilation DB: compile_commands.json
scons: done building targets.
```


