A high-level build system with refreshingly straightforward syntax, designed for flexibility and portability.
Assuming the src
directory contains the source code for a C++ "Hello, world!" program, the following Phoenixfile.phnx
will tell Phoenix how to compile it:
$$Phoenix.checkVersion(minimum: "0.0.1");
$helloworld = CreateTarget("hello", language: "C++");
$helloworld.addSourceDirectory("src");
Phoenix requires a limited subset of C++11, but will compile with GCC 4.6 or better. On all systems where this dependency is met, Phoenix should build and run out of the box, but it might require tweaking for OS-specific paths and locations.
One-liner templates to compile Phoenix:
- Any UNIX shell:
g++ $(find src -name "*.cpp") -Isrc -o phoenix_bootstrapped -std=c++0x -O2
- Windows GCC/PowerShell:
g++ $((Get-ChildItem src -Filter *.cpp -Recurse | % { $_.FullName } | Resolve-Path -Relative) -replace '\s+', ' ').split() -Isrc -o phoenix_bootstrapped -std=c++0x -O2
Currently, the only documentation is the Complete Syntax and Function Reference.