C++ project model with targets, sources, includes and links for Cgride.
Cgride Project is the logical project model module. It describes what a C++ project wants to build without selecting a compiler, generating build commands, executing tasks or printing terminal output.
This module provides the project-level types used by the Cgride engine:
- project model
- target model
- executable targets
- static library targets
- shared library targets
- interface library targets
- source files and source patterns
- include directories
- compile definitions
- compile options
- link options
- target-to-target links
- project validation
Cgride Project does not contain toolchain discovery, build planning, task execution, caching or CLI logic.
- C++23
- Vix CLI
- Vix.cpp
- Cgride Core
vix build --build-target allvix testsvix build --preset release --build-target allFrom the module directory, use the Vix workflow:
vix buildFor a release build:
vix build --preset releasevix check --testsvix installThe install step exposes the cgride::project integration target, public headers, and package metadata.
C++ integrations can use the installed module target from their project build configuration.
#include <cgride/project/project.hpp>
int main()
{
cgride::project::Project project("hello");
auto &core = project.static_library("core");
core.source("src/core.cpp");
core.public_include_directory("include");
auto &app = project.executable("app");
app.source("src/main.cpp");
app.link(core);
return 0;
}Cgride Project may depend on:
cgride::core
Cgride Project may be used by:
cgride::enginecgride::configcgride::cli- external runtimes
- frameworks
- IDE integrations
- developer tools
Cgride Project must not depend on:
cgride::toolchainscgride::graphcgride::executorcgride::cachecgride::enginecgride::configcgride::cli
This module stores project intent only.
It should answer:
What does the project want to build?It should not answer:
Which compiler should be used?
Which files are dirty?
Which commands should run?
How should output be printed?Those decisions belong to higher-level Cgride modules.
MIT