Skip to content

Rexrn/cpp-build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CppBuild

Warning: things described in this README are mostly not implemented yet. Do not use this software for now.


A free and easy to use build tool for C++ based on Node.js that leverage Premake5 as project generator.
Setup your projects easily with JSON files or a JavaScript code.

NodeJS Logo Premake5 Logo



Installation Quick Start Examples
Documentation Goals Contributing

⬇️Installation

Download Node.js, then install CppBuild package like this:

npm install -g github:Rexrn/CppBuild

Congratulations. You can now use CppBuild.

⏩Quick start

1. Hello World Code

Create a folder with a basic C++ Hello World code inside Main.cpp:

#include <iostream>

int main()
{
	std::cout << "Hello, World!";
}

2. Build instructions

and a Project.build.json file with following content:

{
	"name": "MyApp",
	"type": "application",
	"files": [
		"Main.cpp"
	]
}

Note:
If you're not familiar with JSON file format, checkout this page

3. Build from command line

Now build entire application with following command:

cppbuild -g=vs2019 -b Project.build.json

Explaination:

  • -g flag is used to specify build files generator (vs2019 = Visual Studio 2019)
  • -b flag builds all targets.

Note:
Go to this Premake5 tutorial page for complete list of available generators.


For next steps reach out to our Examples page.

⚽Goals

  • Be as easy to use and understand as possible (JSON file format)
  • Support complex scripting if necessary (Node.js JavaScript support)
  • Support library autoconfiguration
  • Serve a lot of useful tutorials (for now, see Examples)

🏃‍♂️Motivation

Premake5 itself does not provide an easy way to modularize code. Each workspace is on its own with configuration, which means that adding a library is always going to add unnecessary complexity. There are workarounds to solve this problem, but they are not as easy and satisfactory.

There are also other build (and meta-build) systems, but in my opinion, those are also too complex. A build tool should be as easy to use as possible.

🌱Contributing

Please wait for the first alpha release.

🙋‍♂️Author

Made by Paweł Syska.

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •