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
Hashes for json2cmake-0.6.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81a4fbca511eea83001fe3ae3ec2f95c7869b1e52421b4871e30a35ddfdd89cf |
|
MD5 | 75309300e9a7783ff70574708dc7cee8 |
|
BLAKE2b-256 | 37f9799b873fc9b813667c2f359119a1177e8753222acfa01b7a4cc0235c7290 |