Generate CMakeLists.txt from a compile_commands.json
Project description
json2cmake converts JSON compilation database files into CMake files. The resulting CMakeLists.txt file can then be used to recompile the same object files with less overhead via Ninja, used as an IDE project file for CLion, or for integration into a larger CMake project.
The output files only include object library definitions, as a compile_commands.json file typically doesn’t contain any linker commands.
Installation
json2cmake is available as a pip package, and can be installed like so:
$ pip install --user json2cmake
pipsi is a useful tool to keep scripts out of other Python environments and virtualenvs:
$ pipsi install json2cmake
Usage
Simply run json2cmake in the directory containing compile_commands.json:
$ json2cmake $ cat CMakeLists.txt cmake_minimum_required(VERSION 2.8.8) project(autogenerated) ...
License
json2cmake is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file json2cmake-0.6.3.tar.gz
.
File metadata
- Download URL: json2cmake-0.6.3.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5916b74b3d90545a0b0bc1e93e820bca1b5ff0f5d3ee5f655ba748dd3811ca65 |
|
MD5 | 4376477cf60ec788222d21d74763d076 |
|
BLAKE2b-256 | 15b111c11e1be789e6561d8b716bc5c26b76b355ecf886aecd7526f690ccac0c |
File details
Details for the file json2cmake-0.6.3-py2.py3-none-any.whl
.
File metadata
- Download URL: json2cmake-0.6.3-py2.py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e848774452e6378c5c73cf8f15ba534441c37edb941802747b2777aa38c4358 |
|
MD5 | b24213bda17df748d01600096dceef1b |
|
BLAKE2b-256 | 735720a25695a86e2f1f99871ef42e4e0135225a2618298acab681dac7fb5026 |