https://github.com/ptomulik/scons-tool-clangpp
SCons support for llvm clang C++ compiler
https://github.com/ptomulik/scons-tool-clangpp
python scons scons-library tool
Last synced: 2 months ago
JSON representation
SCons support for llvm clang C++ compiler
- Host: GitHub
- URL: https://github.com/ptomulik/scons-tool-clangpp
- Owner: ptomulik
- Created: 2014-04-05T04:14:29.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2020-04-17T11:14:13.000Z (about 5 years ago)
- Last Synced: 2025-03-13T01:17:44.521Z (3 months ago)
- Topics: python, scons, scons-library, tool
- Language: Python
- Size: 26.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
scons-tool-clangpp
==================.. image:: https://badge.fury.io/py/scons-tool-clangpp.svg
:target: https://badge.fury.io/py/scons-tool-clangpp
:alt: PyPi package version.. image:: https://travis-ci.org/ptomulik/scons-tool-clangpp.svg?branch=master
:target: https://travis-ci.org/ptomulik/scons-tool-clangpp
:alt: Travis CI build statusSCons_ support for LLVM_ clang_ C++ compiler.
Important note
--------------SCons currently provides ``clangxx`` tool which replaces this one. See SCons
user documentation, especially the `tool list`_. This package is left here for
historical reasons and for some experimental purposes.Installation
------------There are few ways to install this tool to your project.
From pypi_
^^^^^^^^^^.. code-block:: shell
pip install scons-tool-loader scons-tool-clangpp
or, if your project uses pipenv_:
.. code-block:: shell
pipenv install --dev scons-tool-loader scons-tool-clangpp
Alternatively, you may add this to your ``Pipfile``
.. code-block::
[dev-packages]
scons-tool-loader = "*"
scons-tool-clangpp = "*"The tool will be installed as a namespaced package ``sconstool.clangpp``
in project's virtual environment. You may further use scons-tool-loader_
to load the tool.As a git submodule
^^^^^^^^^^^^^^^^^^#. Create new git repository:
.. code-block:: shell
mkdir /tmp/prj && cd /tmp/prj
touch README.rst
git init#. Add the `scons-tool-clangpp`_ as a submodule:
.. code-block:: shell
git submodule add git://github.com/ptomulik/scons-tool-clangpp.git site_scons/site_tools/clangpp
Usage example
-------------#. Create simple C++ file
.. code-block:: cpp
// test.cpp
int main()
{
return 0;
}#. Create simple SConstruct file
.. code-block:: python
# SConstruct
# TODO: uncomment following lines if the tool is installed via pip/pipenv
# import sconstool.loader
# sconstool.loader.extend_toolpath(transparent=True)
env = Environment(tools = ['default', 'clangpp'])
print(env.subst("using $CXX $CXXVERSION"))
env.Program('test.cpp')#. Try it out:
.. code-block:: shell
scons
LICENSE
-------Copyright (c) 2014-2020 by Paweł Tomulik
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.. _LLVM: http://llvm.org/
.. _clang: http://clang.llvm.org/
.. _scons-tool-clangpp: https://github.com/ptomulik/scons-tool-clangpp
.. _scons-tool-loader: https://github.com/ptomulik/scons-tool-loader
.. _SCons: http://scons.org
.. _pipenv: https://pipenv.readthedocs.io/
.. _pypi: https://pypi.org/
.. _tool list: https://scons.org/doc/HTML/scons-user.html#app-tools..