Metadata-Version: 2.4
Name: tcpm
Version: 0.3.3
Summary: Generate CMakePresets.json configuration and build presets from the cartesian product of a set of parameters.
Author-email: Scott Dixon <dixonsco@amazon.com>
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
License-File: LICENSE.rst
Requires-Dist: parsimonious
Requires-Dist: furo ; extra == "docs"
Requires-Dist: sphinx-argparse ; extra == "docs"
Requires-Dist: sphinxemoji ; extra == "docs"
Requires-Dist: sphinx ; extra == "docs"
Requires-Dist: jsonschema>=4.23.0 ; extra == "schema"
Requires-Dist: types-parsimonious ; extra == "test"
Requires-Dist: tox>=4.19.0 ; extra == "test"
Requires-Dist: black==25.1.0 ; extra == "test"
Requires-Dist: colorama ; extra == "test"
Requires-Dist: coverage ; extra == "test"
Requires-Dist: check-manifest==0.50 ; extra == "test"
Requires-Dist: flake8-bugbear ; extra == "test"
Requires-Dist: flake8-docstrings ; extra == "test"
Requires-Dist: flake8-formatter_junit_xml ; extra == "test"
Requires-Dist: flake8 ; extra == "test"
Requires-Dist: flake8-pyproject ; extra == "test"
Requires-Dist: isort==6.0.0 ; extra == "test"
Requires-Dist: lxml ; extra == "test"
Requires-Dist: mypy ; extra == "test"
Requires-Dist: pre-commit ; extra == "test"
Requires-Dist: pylint ; extra == "test"
Requires-Dist: pylint_junit ; extra == "test"
Requires-Dist: pytest-cov ; extra == "test"
Requires-Dist: pytest-mock ; extra == "test"
Requires-Dist: pytest-runner ; extra == "test"
Requires-Dist: pytest>=8.3.4 ; extra == "test"
Requires-Dist: pytest-github-actions-annotate-failures ; extra == "test"
Requires-Dist: sybil[pytest] ; extra == "test"
Requires-Dist: jsonschema>=4.23.0 ; extra == "test"
Project-URL: Documentation, https://thirtytwobits.github.io/the-cmake-preset-matrix
Project-URL: Source, https://github.com/thirtytwobits/the-cmake-preset-matrix
Project-URL: Tracker, https://github.com/thirtytwobits/the-cmake-preset-matrix/issues
Provides-Extra: docs
Provides-Extra: schema
Provides-Extra: test

################################################
 TCPM: (the) Cmake Preset Matrix
################################################

|badge_build|_ |badge_pypi_support|_ |badge_pypi_version|_ |badge_docs|_

`TCPM`_ is a `CMakePresets.json`_ transformation tool that generates presets for the cartesian product of a set of
parameters. For example, given two toolchains :

.. code-block:: json

    "toolchain": [
        "gcc",
        "clang"
    ],

and two different c++ language standards:

.. code-block:: json

    "standard": [
        "cpp-20",
        "cpp-23"
    ],

the ``tcpm`` tool will generate four (4) configuration presets:

.. code-block:: json

    {
        "name": "configure-gcc-cpp-20"
    },
    {
        "name": "configure-gcc-cpp-23"
    },
    {
        "name": "configure-clang-cpp-20"
    },
    {
        "name": "configure-clang-cpp-23"
    },


If you added a third parameter list with two items then `TCPM`_ would generate eight (8) configurations, the cartesian
product producing :math:`|A| \times |B| = |A| * |B|` items.

`TCPM`_ also provides a template language to allow generation of various preset fields like ``"cacheVariables"``. These
templates, called "shapes" in the json, are given contextual tokens to use in string expansion and, for more complex
logic, the ``pQuery`` DSL embedded in `TCPM`_ allows procedural expansion of fields based on the state of a presets
document at the time a given preset is generated.

There's a lot more to it, of course, and `TCPM`_ provides a complete JSON transformation language for presets json in
in addition to other features. To get started we reccommend starting with the
`Try Me`_ exercise.

.. note ::

    This is alpha software. A lot will change before 1.0. Your input is required to get there.
    Thanks for helping ❤️

    This project is an experiment, a proposal, a tool. One of these three things will become the roadmap for it over
    time. As an experiment, this tool will explore the utility of `CMakePresets.json`_ which makes direct integration
    of cmake with CI worflows possible. As a proposal, this project demonstrates certain functionality not available in
    the current version of `CMakePresets.json`_ as a suggestion to `Kitware`_ when evolving this part of their product.
    Finally, this is a tool that will continue to aid complex projects in the management of their preset files
    whether or not `Kitware`_ adds similar features supporting matrix builds in the future.


Key Features
************************************************

* **Matrix Builds** – Provides a way to manage large matrices of build types for complex projects that doesn't require
  copy-and-paste or a lot of typing 😩
* **Idempotent** – The tool will continue to produce the same output given the same parameters as inputs. This allows
  automated generation of `CMakePresets.json`_ files from themselves or using separate template files.
* **Preserves Existing Presets** – Any presets that are manually added to a `CMakePresets.json`_ file will be maintained
  when using the "expand-in-place" features of this tool.

.. _`TCPM`: https://github.com/thirtytwobits/the-cmake-preset-matrix

.. _`Kitware`: https://www.kitware.com/

.. _`CMakePresets.json`: https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html

.. _`Try Me`: https://thirtytwobits.github.io/the-cmake-preset-matrix/tryme/index.html

.. _`Guide`: docs/guide/

.. |tcpm_logo| image:: /docs/static/SVG/matrix_logo.svg
   :width: 50px

.. |badge_build| image:: https://github.com/thirtytwobits/the-cmake-preset-matrix/actions/workflows/CI.yml/badge.svg
    :alt: Build status
.. _badge_build: https://github.com/thirtytwobits/the-cmake-preset-matrix/actions/workflows/CI.yml

.. |badge_pypi_support| image:: https://img.shields.io/pypi/pyversions/tcpm.svg
    :alt: Supported Python Versions
.. _badge_pypi_support: https://pypi.org/project/tcpm/

.. |badge_pypi_version| image:: https://img.shields.io/pypi/v/tcpm.svg
    :alt: PyPI Release Version
.. _badge_pypi_version: https://pypi.org/project/tcpm/

.. |badge_docs| image:: https://img.shields.io/github/deployments/thirtytwobits/the-cmake-preset-matrix/github-pages?label=docs&logo=github
   :alt: GitHub deployments
.. _badge_docs: https://thirtytwobits.github.io/the-cmake-preset-matrix

