Menu

Tree [8ec3b9] master /
 History

HTTPS access


File Date Author Commit
 CBuild 2024-08-12 WolodiaM WolodiaM [8ec3b9] Release 13.5
 TODO 2024-08-12 WolodiaM WolodiaM [8ec3b9] Release 13.5
 build 2024-08-12 WolodiaM WolodiaM [8ec3b9] Release 13.5
 doxygen 2024-08-12 WolodiaM WolodiaM [8ec3b9] Release 13.5
 gprof 2024-01-09 WolodiaM WolodiaM [2a406e] Release 10.4
 packages 2024-08-12 WolodiaM WolodiaM [8ec3b9] Release 13.5
 scripts 2024-08-12 WolodiaM WolodiaM [8ec3b9] Release 13.5
 sh 2024-08-12 WolodiaM WolodiaM [8ec3b9] Release 13.5
 template 2024-05-05 WolodiaM WolodiaM [2feb64] Release 12.5
 .clang-format 2024-01-25 WolodiaM WolodiaM [685d80] Forget about some files on commit
 .gitignore 2024-03-16 WolodiaM WolodiaM [60815f] Updated .gitignore, again
 CBuild.run 2024-06-05 WolodiaM WolodiaM [8559da] Release 13.4
 LICENSE 2023-12-01 WolodiaM WolodiaM [02d975] Release 9.10
 build.sh 2024-01-25 WolodiaM WolodiaM [dbd026] Release 10.9
 compile_commands.json 2024-08-12 WolodiaM WolodiaM [8ec3b9] Release 13.5
 doxygen.conf 2023-12-01 WolodiaM WolodiaM [02d975] Release 9.10
 gmon.out 2024-08-12 WolodiaM WolodiaM [8ec3b9] Release 13.5
 info.md 2024-06-05 WolodiaM WolodiaM [8559da] Release 13.4
 new_specs.txt 2024-08-12 WolodiaM WolodiaM [8ec3b9] Release 13.5
 readme.md 2023-12-01 WolodiaM WolodiaM [02d975] Release 9.10
 rebuild.sh 2024-06-05 WolodiaM WolodiaM [8559da] Release 13.4
 requirments.md 2023-12-01 WolodiaM WolodiaM [02d975] Release 9.10
 usage.md 2024-01-10 WolodiaM WolodiaM [3822c9] Some additions to relase 10.4

Read Me

CBuild

Full feathured build system for C / C++.
All build scripts go into scripts folder.
All build scripts is written in C++ (can be written in C but CBuild does not have any C API).
All html and TeX are because of doxygen ;)

Some usage info, also via CBuild.run --help

Example

This is folder structure:

project  
    |  
    |- - build (will be created by CBuild)  
    |- - cache (will be created by CBuild)  
    |  
    |--- scripts (build scripts go here)  
    |           |  
    |           |--- main.cpp  
    |           |--- user_init.hpp  
    |           |--- user_init.cpp  
    |  
    |--- src (project code goes here)  
    |--- CBuild.run (main CBuild executable)  

main.cpp -> main file of Cbuild executable, change only if you know how CBuild work internally.
user_init.hpp -> headers of user scripts, have 1 function, that need to be called in main.cpp (init()).
user_init.cpp -> implemenet init() form headers, thie function will be ruuned at a start of Cbuild, before all core functions.
example build script for lib and app that use it:

// C++ libraries  
#include "stdio.h"  
// Userspace headers  
#include "user_init.hpp"  
// CBuild headers  
#include "CBuild/task/Task.hpp"  
#include "CBuild/register.hpp"  
#include "CBuild/build/g++.hpp"  
#include "CBuild/print.hpp"  

CBuild::GXX app("app", "App");  
CBuild::GXX lib("lib", "lib");  

void init()  
{  
    app.set_standart("c++20");  
    app.add_file("src/main.cpp");  
    app.warn();  
    app.set_type(CBuild::EXECUTABLE);  
    app.depends_on("lib");  
    CBuild::Registry::RegisterTarget(&app);  
    lib.set_standart("c++20");  
    lib.add_file("src/test.cpp");  
    lib.warn();  
    lib.set_type(CBuild::DYNAMIC_LIBRARY);  
    CBuild::Registry::RegisterTarget(&lib);  
}  

It uses g++ as compiler, and c++20.

Other info

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.