compiletools


Namecompiletools JSON
Version 6.1.3 PyPI version JSON
download
home_pageNone
SummaryTools to make compiling C/C++ projects easy
upload_time2025-10-20 09:25:57
maintainerNone
docs_urlNone
authorDrGeoff
requires_python>=3.9
licenseNone
keywords c++ make development
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://github.com/DrGeoff/compiletools/actions/workflows/main.yml/badge.svg
    :target: https://github.com/DrGeoff/compiletools/actions

============
compiletools
============

--------------------------------------------------------
C/C++ build tools that requires almost no configuration.
--------------------------------------------------------

:Author: drgeoffathome@gmail.com
:Date:   2016-08-09
:Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
:Version: 6.1.3
:Manual section: 1
:Manual group: developers

SYNOPSIS
========
    ct-* [compilation args] [filename.cpp] [--variant=<VARIANT>]

DESCRIPTION
===========
The various ct-* tools exist to build C/C++ executables with almost no
configuration. For example, to build a C or C++ program, type

.. code-block:: bash

    ct-cake

which will automatically determine the correct source files to generate executables
from and also determine the tests to build and run. (The ``--auto`` flag is the
default; use ``--no-auto`` to disable automatic target detection.)

A variant is a configuration file that specifies various configurable settings
like the compiler and compiler flags. Common variants are "debug" and "release".

CONFIGURATION
=============
Options are parsed using the python package ConfigArgParse.  This means they can be passed
in on the command line, as environment variables or in config files.
Command-line values override environment variables which override config file 
values which override defaults. Note that the environment variables are 
captilized. That is, a command line option of --magic=cpp is the equivalent of 
an environment variable MAGIC=cpp.

If the option itself starts with a hypen then configargparse can fail to parse 
it as you intended. For example, on many platforms,

.. code-block:: bash

    --append-CXXFLAGS=-march=skylake

will fail. To work around this, compiletools postprocesses the options to 
understand quotes. For example,

.. code-block:: bash

    --append-CXXFLAGS="-march=skylake" 

will work on all platforms.  Note however that many shells (e.g., bash) will strip 
quotes so you need to escape the quotes or single quote stop the shell preprocessing. 
For example,

.. code-block:: bash

    --append-CXXFLAGS=\\"-march=skylake\\"  
    or 
    --append-CXXFLAGS='"-march=skylake"'

SHARED OBJECT CACHE
===================
compiletools supports a shared object file cache for multi-user/multi-host
environments. When enabled via ``shared-objects = true`` in ct.conf 
(or via the command line or environment variable), the Makefile
generation includes proper locking mechanisms to safely share object files across
concurrent builds by multiple users and hosts. 

Setting in ct.conf is the recommended way to enable this feature for teams so that 
all users gain the locking without needing to set their own environment variables. 

This feature can also be used by a single developer on a single machine to compile 
different directories in parallel, sharing the same object file cache for objects 
that are in common.

Key features:

* **Content-addressable storage**: Object files named by source + flags hash
* **Filesystem-aware locking**: Uses flock on local filesystems, atomic mkdir on network filesystems (NFS, GPFS, Lustre)
* **Multi-user safe**: Group-writable cache with proper file permissions
* **Cross-host compatible**: Automatic filesystem detection and appropriate locking strategy
* **Stale lock detection**: Automatic cleanup of locks from crashed builds
* **Minimal configuration**: Just set ``shared-objects = true`` in config

Example setup for shared cache:

.. code-block:: bash

    # In ct.conf or variant config
    shared-objects = true
    objdir = /shared/nfs/build/cache

    # Ensure cache directory is group-writable with SGID
    mkdir -p /shared/nfs/build/cache
    chmod 2775 /shared/nfs/build/cache

Configuration options in ct.conf:

* ``max_file_read_size = 0`` - Bytes to read from files (0 = entire file)
* ``shared-objects = true`` - Enable shared object cache

OTHER TOOLS
===========
Other notable tools are:

* ct-headertree: provides information about structure of the include files
* ct-filelist: provides the list of files needed to be included in a tarball (e.g. for packaging)

SEE ALSO
========
* ct-build
* ct-build-dynamic-library
* ct-build-static-library
* ct-cache
* ct-cache-clean
* ct-cake
* ct-cmakelists
* ct-compilation-database
* ct-config
* ct-cppdeps
* ct-create-cmakelists
* ct-create-makefile
* ct-filelist
* ct-findtargets
* ct-git-sha-report
* ct-gitroot
* ct-headertree
* ct-jobs
* ct-list-variants
* ct-magicflags

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "compiletools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "c++, make, development",
    "author": "DrGeoff",
    "author_email": "DrGeoff <drgeoffathome@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/eb/1b/fdfdb3b501404b79ee482bf7f14a7d6b8100e40f2918268e180c1d7f14f4/compiletools-6.1.3.tar.gz",
    "platform": null,
    "description": ".. image:: https://github.com/DrGeoff/compiletools/actions/workflows/main.yml/badge.svg\n    :target: https://github.com/DrGeoff/compiletools/actions\n\n============\ncompiletools\n============\n\n--------------------------------------------------------\nC/C++ build tools that requires almost no configuration.\n--------------------------------------------------------\n\n:Author: drgeoffathome@gmail.com\n:Date:   2016-08-09\n:Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd\n:Version: 6.1.3\n:Manual section: 1\n:Manual group: developers\n\nSYNOPSIS\n========\n    ct-* [compilation args] [filename.cpp] [--variant=<VARIANT>]\n\nDESCRIPTION\n===========\nThe various ct-* tools exist to build C/C++ executables with almost no\nconfiguration. For example, to build a C or C++ program, type\n\n.. code-block:: bash\n\n    ct-cake\n\nwhich will automatically determine the correct source files to generate executables\nfrom and also determine the tests to build and run. (The ``--auto`` flag is the\ndefault; use ``--no-auto`` to disable automatic target detection.)\n\nA variant is a configuration file that specifies various configurable settings\nlike the compiler and compiler flags. Common variants are \"debug\" and \"release\".\n\nCONFIGURATION\n=============\nOptions are parsed using the python package ConfigArgParse.  This means they can be passed\nin on the command line, as environment variables or in config files.\nCommand-line values override environment variables which override config file \nvalues which override defaults. Note that the environment variables are \ncaptilized. That is, a command line option of --magic=cpp is the equivalent of \nan environment variable MAGIC=cpp.\n\nIf the option itself starts with a hypen then configargparse can fail to parse \nit as you intended. For example, on many platforms,\n\n.. code-block:: bash\n\n    --append-CXXFLAGS=-march=skylake\n\nwill fail. To work around this, compiletools postprocesses the options to \nunderstand quotes. For example,\n\n.. code-block:: bash\n\n    --append-CXXFLAGS=\"-march=skylake\" \n\nwill work on all platforms.  Note however that many shells (e.g., bash) will strip \nquotes so you need to escape the quotes or single quote stop the shell preprocessing. \nFor example,\n\n.. code-block:: bash\n\n    --append-CXXFLAGS=\\\\\"-march=skylake\\\\\"  \n    or \n    --append-CXXFLAGS='\"-march=skylake\"'\n\nSHARED OBJECT CACHE\n===================\ncompiletools supports a shared object file cache for multi-user/multi-host\nenvironments. When enabled via ``shared-objects = true`` in ct.conf \n(or via the command line or environment variable), the Makefile\ngeneration includes proper locking mechanisms to safely share object files across\nconcurrent builds by multiple users and hosts. \n\nSetting in ct.conf is the recommended way to enable this feature for teams so that \nall users gain the locking without needing to set their own environment variables. \n\nThis feature can also be used by a single developer on a single machine to compile \ndifferent directories in parallel, sharing the same object file cache for objects \nthat are in common.\n\nKey features:\n\n* **Content-addressable storage**: Object files named by source + flags hash\n* **Filesystem-aware locking**: Uses flock on local filesystems, atomic mkdir on network filesystems (NFS, GPFS, Lustre)\n* **Multi-user safe**: Group-writable cache with proper file permissions\n* **Cross-host compatible**: Automatic filesystem detection and appropriate locking strategy\n* **Stale lock detection**: Automatic cleanup of locks from crashed builds\n* **Minimal configuration**: Just set ``shared-objects = true`` in config\n\nExample setup for shared cache:\n\n.. code-block:: bash\n\n    # In ct.conf or variant config\n    shared-objects = true\n    objdir = /shared/nfs/build/cache\n\n    # Ensure cache directory is group-writable with SGID\n    mkdir -p /shared/nfs/build/cache\n    chmod 2775 /shared/nfs/build/cache\n\nConfiguration options in ct.conf:\n\n* ``max_file_read_size = 0`` - Bytes to read from files (0 = entire file)\n* ``shared-objects = true`` - Enable shared object cache\n\nOTHER TOOLS\n===========\nOther notable tools are:\n\n* ct-headertree: provides information about structure of the include files\n* ct-filelist: provides the list of files needed to be included in a tarball (e.g. for packaging)\n\nSEE ALSO\n========\n* ct-build\n* ct-build-dynamic-library\n* ct-build-static-library\n* ct-cache\n* ct-cache-clean\n* ct-cake\n* ct-cmakelists\n* ct-compilation-database\n* ct-config\n* ct-cppdeps\n* ct-create-cmakelists\n* ct-create-makefile\n* ct-filelist\n* ct-findtargets\n* ct-git-sha-report\n* ct-gitroot\n* ct-headertree\n* ct-jobs\n* ct-list-variants\n* ct-magicflags\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Tools to make compiling C/C++ projects easy",
    "version": "6.1.3",
    "project_urls": {
        "Download": "https://github.com/DrGeoff/compiletools/archive/v{version}.tar.gz",
        "Homepage": "http://drgeoff.github.io/compiletools/"
    },
    "split_keywords": [
        "c++",
        " make",
        " development"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3ecd0d516ff2930cc332794acec28c005ca711e2d2249c00e73139a18be2c7c3",
                "md5": "701d141851094ec43a5311e9f94a2bde",
                "sha256": "6f1a1e33e5a225f848b3c2e7c33535f0d39406e181838adbedab058f943515e2"
            },
            "downloads": -1,
            "filename": "compiletools-6.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "701d141851094ec43a5311e9f94a2bde",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 347358,
            "upload_time": "2025-10-20T09:25:55",
            "upload_time_iso_8601": "2025-10-20T09:25:55.329964Z",
            "url": "https://files.pythonhosted.org/packages/3e/cd/0d516ff2930cc332794acec28c005ca711e2d2249c00e73139a18be2c7c3/compiletools-6.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "eb1bfdfdb3b501404b79ee482bf7f14a7d6b8100e40f2918268e180c1d7f14f4",
                "md5": "44acf0d65e54668f1c27936661ef7dc8",
                "sha256": "68b7f840a980f0df5c0bcc885abce0cf9e3d3373511dac142ee8388899cff2e8"
            },
            "downloads": -1,
            "filename": "compiletools-6.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "44acf0d65e54668f1c27936661ef7dc8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 241207,
            "upload_time": "2025-10-20T09:25:57",
            "upload_time_iso_8601": "2025-10-20T09:25:57.541575Z",
            "url": "https://files.pythonhosted.org/packages/eb/1b/fdfdb3b501404b79ee482bf7f14a7d6b8100e40f2918268e180c1d7f14f4/compiletools-6.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-20 09:25:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DrGeoff",
    "github_project": "compiletools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "compiletools"
}
        
Elapsed time: 2.11891s