Converts CMake build descriptions for a complete project to SCons scripts (SConstruct/SConscript)
This tool can be used to “convert” a CMake-based build project to SCons. It’s intended for comparisons between these two build systems, mainly regarding speed performance. But it can also be used to automate the tedious work of rewriting all the build spec files, when switching a project from CMake to SCons.
Please note that currently not all CMake commands are implemented, so you still have to look over all output files and correct things where necessary.
For installing via pip, you have to say
pip install cmake2scons
Your other option is to clone the repository https://bitbucket.org/dirkbaechle/cmake2scons, change into its top-level folder, get root and then run the command
python setup.py install
After a successful installation, you can call CMake2SCons from the command-line
It supports an optional parameter, the path to the top-level folder of your CMake-based project. If no argument is given, the current working directory is used (default “.”). CMake2SCons then scans all contained folders recursively for files named “CMakeLists.txt” and writes a new “SConscript” in parallel for each. The top-level CMake file gets converted to an “SConstruct” file.
A simple usage message gets listed with the -h option (or --help).
CMake2SCons should run under any Python2.x, with having the
TODOs and known problems
- Implement more commands.