Skip to content

cusiman7/BuildCPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build CPP

Build CPP is an open source build system written in C++ and written in C++. Why configure your C++ project in any other language? Build CPP is both fast to generate your project and fast to compile it because it uses Ninja as its backend for building your C++ projects.

Building Your C++ Project With Build CPP

  1. Describe your project in C++ in a file called build.cpp at the root of your project directory.
  2. Run buildcpp build to generate a ./build/build.ninja file.
  3. Run ninja -C build/build.ninja to compile and link your project.

Example

Build CPP is of course built with Build CPP and its build.cpp file serves as a good starting example.

How Does Build CPP Work?

Build CPP compiles your project definition file, build.cpp, with your system's C++ compiler into a dynamic library that it then loads and executes to generate a build.ninja file for you. This is only done once during initial project generation or whenever you change build.cpp or any headers it includes. This way, incremental builds with Ninja stay fast.

Bootstrapping Build CPP

Build CPP ships with a build.ninja file that is both a valid Ninja file and a source file that includes buildcpp's entire single header source when compiled. Simply run ninja to bootstrap buildcpp itself. If you would like to trial buildcpp in your project or with your team just copy ./build.ninja and single_include to your project's root and run ninja to build buildcpp. You can then use buildcpp as described above. Platforms other than MacOS will be supported in the future but for now check build.ninja for Build CPP's compiler and linker flags and requirements as they are non-trivial. BuildCPP has no external C++ dependencies and only requires Ninja to be installed on your system.

About

BuildCPP is an open source build system written in C++ and written in C++.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages