semvec/pypi-packages huggingface dataset:
json2cmake 0.6.3
Generate CMakeLists.txt from a compile_commands.json
License: MIT
Keywords: c c++ cmake development

json2cmake
==========

|Build Status| |PyPI version|

``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`_.

.. _JSON compilation database: http://clang.llvm.org/docs/JSONCompilationDatabase.html
.. _CMake: https://cmake.org/
.. _Ninja: https://ninja-build.org/
.. _CLion: https://www.jetbrains.com/clion/
.. _object library: https://cmake.org/Wiki/CMake/Tutorials/Object_Library
.. _pipsi: https://github.com/mitsuhiko/pipsi
.. _MIT License: https://github.com/AbigailBuccaneer/json2cmake/blob/master/LICENSE

.. |Build Status| image:: https://travis-ci.org/AbigailBuccaneer/json2cmake.svg?branch=master
   :target: https://travis-ci.org/AbigailBuccaneer/json2cmake
.. |PyPI version| image:: https://img.shields.io/pypi/v/json2cmake.svg
   :target: https://pypi.python.org/pypi/json2cmake