This code is authorized for use under the BSD 2-clause license.
The build tool is split into a few logical components.
This contains specific details for the platform being built on. Linux, Mac OS X and Windows are supported with the ability to add more as needed.
This is the platform the build system is being executed on. It doesn't necessarily correspond to the Target Platform. This contains common conventions specific to a platform in order for this build system to function properly; like creating paths correctly.
Drivers are a special type of Command. These are ultimately what will do any raw building of source files. There is out-of-the-box support for msbuild, xcodebuild, and GNU make. Again, this is extensible.
Commands are classes that wrap a generic command-line utility. There are several built-in commands for file processing as well as CMake and Premake. As with platforms, you can create new commands as needed.
Actions describe different functions that can be run on a build script. The current list of supported actions include:
- generate: Generates project files
- build: build product(s)
- clean: remove intermediate and output files
- distclean: removes all generated files and folders
Actions may run recursively for all products and dependencies. You can limit this to run on the active product - see options.
from pegasus.models import ProductType, Product def arguments(parser): parser.add_argument("--with-zlib", help="Compile with zlib", action="store_true", dest="with_zlib", default=False) def products(arguments, target_platform): test = Product(name="test", output=ProductType.StaticLibrary) test.sources = [ "src/**.cpp", "src/**.h" ] test.includes = [ "src" ] return [test]