A python based light-weight build system for C/C++, with an emphasis on simplicity and ease of use. The aim is to maintain transparency, but abstract away the tedious parts of building a project.
Requires python, install from here.
Install using pip:
pip install git+https://github.com/StealthyPanda/hermes.gitAny project can be turned into a hermes project by creating a single hermes.json JSON file in the root folder of the project. This file is the single source of controlling the build system, and contains all the build information.
In the root folder of the project, open a terminal and run:
hermes initor simply create an empty hermes.json file. To build the project, simply run hermes build in terminal.
The JSON file controls the following (and only) settings for building the project:
-
"name": Name of the hermes module. -
"compiler": The compiler used for building; defaults toclang(not included) or uses the full path provided to compiler binary. -
"inputs": Input files for the project (all.cor.cppfiles)"exe": files for final executable"lib": files for making static lib
-
"libs": names of static libs to include -
"libdirs": dirs to find these libs in -
"libincdirs": dirs to find headers for these libs in -
"target": info for target"type":"exe"or"lib""run":trueorfalse. whether to run the final executable after building"exeout": path for executable output"libout": path for static lib output"incdirs": dirs containing header files when compiling as a static lib
-
"submodules": other hermes modules to use in this module. just provide root of the module (containinghermes.json). there are 2 ways to do so:"assrcs": modules to include as source. this won't compile submodules as static lib files, and instead treat sources in submodule as part of this module. if unsure, use this method."aslibs": modules to include as static libs. this will compile submodules as static lib files (respecting their own lib include methods and stuff), and automatically link them in this module.
-
"copts": additional compilation options -
"lopts": additional linker options
Rule of thumb, if you include anything within "", it is tracked for changes and treated as part of the codebase, and anything within <> is treated as external headers (untracked).
To build, run
hermes buildUse --debug for debug output, and --verbose for verbose.
And that's it! The build system is meant to be as non-opaque as possible, while still automating and speeding up only most tedious part of the building process and giving you complete control.