Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Build C, C++ and ASM files in C++

License

NotificationsYou must be signed in to change notification settings

coder137/build_in_cpp

Repository files navigation

Linux GCC build

Windows CMake build

codecov

Build C, C++ and ASM files in C++

Aim

BuildCC aims to be an alternative toMakefiles while using the feature rich C++ language instead of a custom DSL.

Features

  • Complete flexibility for custom workflows and toolchains
  • C++ language feature benefits anddebuggable build binaries
  • Optimized rebuilds through serialization. Seetarget.fbs schema
    • Can optimize for rebuilds by comparing the previous stored build with current build.
    • Also see theFAQ for more details on Serialization
  • Customizable for community plugins. More details provided in theCommunity Plugin section.

Pre-requisites

  • C++17 Compiler with
    • C++17 filesystem library support
    • C++11 thread library support
  • Third Party Libraries (See License below)
    • Nlohmann::Json v3.11.2
    • Taskflow v3.1.0
    • CLI11 v2.1.0
    • Tiny Process Library v2.0.4
    • fmt v8.0.1
    • spdlog v1.9.2
    • CppUTest v4.0
    • Tl::Optional (master)

General Information

  • A one stageinput / output procedure is called aGenerator with a wide variety of use cases
    • Single input creates single output
    • Single input creates multiple outputs
    • Multiple inputs create single output
    • Multiple inputs creates multiple outputs
  • A two stagecompile andlink procedure is called aTarget
    • This means that Executables, StaticLibraries and DynamicLibraries are all categorized as Targets
    • In the future C++20 modules can also be its own target depending on compiler implementations
  • Every Target requires a complementary (and compatible)Toolchain
    • This ensures that cross compiling is very easy and explicit in nature.
    • Multiple toolchains can bemixed in a single build file i.e we can generate targets using the GCC, Clang, MSVC and many other compilerssimultaneously.
  • Thecompile_command (pch and object commands) andlink_command (target command) is fed to theprocess call to invoke theToolchain.
  • EachTarget can depend on other targets efficiently through Parallel Programming usingTaskflow.
    • Dependency between targets is explicitly mentioned through the Taskflow APIs
    • This has been made easier for the user through thebuildcc::Register module.
  • Build files can be customized through command line arguments
    • Command line arguments can be stored in configurable.toml files and passed using the--config flag.
    • Users can define their own custom arguments.
    • Argument passing has been made easy using thebuildcc::Args module.

Software Architecture

Interface lib dependencies

BuildCC Interface library

Single lib dependencies

BuildCC Single library

Dependency Chart

Dependency Chart

State Diagram

See alsohow to create uml diagrams using VSCode

Community Plugin

  • buildcc::base::Generator,buildcc::base::TargetInfo andbuildcc::base::Target contains public getters that can be used to construct unique community plugins.
  • Common tools and plugins would have first-party support in buildcc.
  • All other tools and plugins can be maintained by individual developers.

Current state of BuildCC supported plugins

Examples

Containsproof of concept andreal worldexamples.

Visual hybrid example graphs

Taskflow dependency for hybrid/simple exampleHybrid Simple example

  • Build GCC and MSVC Targets simultaneously
  • 1 C and 1 CPP example for both toolchains

Taskflow dependency for hybrid/pch exampleHybrid PCH example

  • Activate PCH for GCC and MSVC Targets
  • 1 C and 1 CPP example for both toolchains

Taskflow dependency for hybrid/dep_chaining exampleHybrid Dep Chain example

  • ChainGenerator withTargets for Dependency
  • 1 C and 1 CPP example for both toolchains

User Guide

Developers interested in usingBuildCC

Developer Guide

Developers interested in contributing toBuildCC

FAQ

Target

Serialization

Design/Reasoning

Miscellaneous

TODO

List of features to be implemented before buildcc can be considered production ready.

I would also like to request help from the Community for the following:

  • Code reviews
  • Design patterns
  • Optimization strategies
  • TODO discussions

License Dependencies

BuildCC is licensed under the Apache License, Version 2.0. SeeLICENSE for the full license text.BuildCC aims to use open-source libraries containing permissive licenses.

Developers who would like to suggest an alternative library, raise an issue with thelicense andadvantages clearly outlined.

About

Build C, C++ and ASM files in C++

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp