Package: cpppm
cpppmCPP Project Manager(master)(devel)cpppmis a C/C++ build-system/package manager (throughconan) that focus on flexibility.While (most of) other build systems are jailing you into a re-invented scripting
language,cpppmis nothing else but a python module that provides you some
facilities to build your software.
Thus, you can do everything you are able to do with python.ThecpppmAPI semantics is close toCMake(eg.:link_libraries,compile_options, etc...).A basic exampleConsider following code:main.cpp:#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN#include<doctest/doctest.h>#include<fmt/format.h>TEST_CASE("cpppm loves conan"){CHECK(fmt::format("{1} loves {0} !!!","conan","cpppm")=="cpppm loves conan !!!");}project.py:#!/usr/bin/env python3fromcpppmimportProject,mainproject=Project('conan_requires')project.requires='fmt/6.1.2','doctest/2.3.6'exe=project.main_executable()exe.sources='src/main.cpp'exe.link_libraries='fmt','doctest'if__name__=='__main__':main()At this point you'll be able to run:$./project.pyrunconan_requires# Build output ommitted...[doctest]doctestversionis"2.3.6"[doctest]runwith"--help"foroptions===============================================================================[doctest]testcases:1|1passed|0failed|0skipped[doctest]assertions:1|1passed|0failed|[doctest]Status:SUCCESS!Check out the examples folder for more use cases.InstallationBy cloning this repository:gitclonehttps://github.com/Garcia6l20/cpppm.gitcdcpppm
pythonsetup.pyinstall--userAvailable onPyPi:pipinstall--usercpppmCommandsDefault commands can be listed with a regular help request:$./project.py-h
Usage:project.py[OPTIONS]COMMAND[ARGS]...

Options:-v,--verboseLetmetalkaboutme.-o,--out-directoryTEXTBuilddirectory,generatedfilesshouldgothere.-d,--debugPrintextradebuginformation.-c,--cleanRemoveallstuffbeforeprocessingthefollowingcommand.-C,--configTEXTConfignametouse.-h,--helpShowthismessageandexit.

Commands:buildBuildstheproject.configProjectconfigurationcommandgroup.installInstallstargetstodestination.interactiveInteractivepythonconsolewithloadedproject.runRunsthegivenTARGETwithgivenARGS.shellInteractiveshell(clicommandsinshellmode).syncSynchronizeconanpackagerecipe(conanfile.py).testRunstheunittests.toolchainToolchaincommandgroup.Conan bidingcpppmis tidally coupled toconanand can be used as is to create
packages.When you add requirements to your project aconanfile.pyappears side by side
with youproject.py.
It is used to install your dependencies or to allow conan to interact with your project.The generatedconanfile.pymight not be edited or it should be automatically re-generated.So, regularconanprocess applies directly to your project.cdexamples
conancreate.
conanuploadcpppm-examples-rmy_repoUser of your generated package should be able to use it with all build-systems
handled by conan and obviously withcpppm(seetest_package).ShellAn interactive shell mode is provided withclick-shell.
To enable interactive shell, installcpppminteractive mode:$python-mpipinstallcpppm[interactive]Then enter interactive shell:$./project.pyshell
Enteringcpppm-examplesshell...
cpppm-examples$helpDocumentedcommands(typehelp<topic>):========================================buildinstallinteractiveshelltestconfiginstall-requirementsrunsynctoolchain

Undocumentedcommands:======================exithelpquit

cpppm-examples$build[...someoutputomitted...]INFO:cpppm.UnixCompiler(gcc-11-x86_64):buildingExecutable[events]INFO:cpppm.UnixCompiler(gcc-11-x86_64):compilingmain.o(Executable[events])INFO:cpppm.UnixCompiler(gcc-11-x86_64):linkingevents
cpppm-examples$runhello-cpppm
Sourcedirectory:/home/sylvain/projects/cpppm/examples
Builddirectory:/home/sylvain/projects/cpppm/examples/build/gcc-11-x86_64-Release
Project:cpppm-examples
INFO:cpppm.UnixCompiler(gcc-11-x86_64):usingccache
INFO:cpppm.UnixCompiler(gcc-11-x86_64):buildingExecutable[hello-cpppm]INFO:cpppm.UnixCompiler(gcc-11-x86_64):object/home/sylvain/projects/cpppm/examples/build/gcc-11-x86_64-Release/hello_cpppm/main.oisup-to-date
INFO:cpppm.UnixCompiler(gcc-11-x86_64):usingccache
INFO:cpppm.UnixCompiler(gcc-11-x86_64):buildingExecutable[hello-cpppm]INFO:cpppm.UnixCompiler(gcc-11-x86_64):object/home/sylvain/projects/cpppm/examples/build/gcc-11-x86_64-Release/hello_cpppm/main.oisup-to-date
Hellocpppm
cpppm-examples$quitInteractive consoleAn interactive console mode is provided withIPython, but not installed automatically.
To enable interactive console, installcpppminteractive mode:$python-mpipinstallcpppm[interactive]Then enter interactive console:$./project.pyinteractive
Python3.8.5(default,Jul282020,12:59:40)Type'copyright','credits'or'license'formoreinformation
IPython7.19.0--AnenhancedInteractivePython.Type'?'forhelp.

In[1]:awaitproject.get_target('hello-cpppm').run('world')INFO:cpppm.UnixCompiler(gcc-11-x86_64):usingccache
INFO:cpppm.UnixCompiler(gcc-11-x86_64):buildingExecutable[hello-cpppm]INFO:cpppm.UnixCompiler(gcc-11-x86_64):object/home/sylvain/projects/cpppm/examples/build/gcc-11-x86_64-Release/hello_cpppm/main.oisup-to-date
Helloworld
Out[1]:(0,None,b'')In[2]:FeaturesCMakeLists.txt generation(no more using CMake)Project compilationBuild events(useless), generators (will probably be moved into generic Targets)Conan package dependencies managementExecutables invocation (automatically added to cli interface)Customizable (you can do anything you can do with python)Cli customization (cou can add any@cpppm.cli.commandthat you want to add, seeclick)Unit testing (basic support)Conan package generationContributingWould be appreciated, no contribution guide, justPEP-8 codding styleand smart codding, fork/PR.