Skip to content

beta-v2.2.2

Pre-release
Pre-release

Choose a tag to compare

@ChaseSunstrom ChaseSunstrom released this 01 Dec 22:02
· 43 commits to master since this release

CForge Release beta-v2.2.2

Cross-Compilation Profiles & Documentation Overhaul

CForge beta-v2.2.2 introduces reusable cross-compilation profiles for targeting multiple platforms, fixes a critical build cache bug, and brings the documentation up to date.


Bug Fixes

CMakeLists.txt Regeneration Fix

  • Fixed issue where CMakeLists.txt was not being regenerated when cforge.toml was modified, even though the hash was changing
  • Root cause: clone_git_dependencies() was saving the cforge.toml hash before generate_cmakelists_from_toml() could detect changes
  • Location: src/core/command_build.cpp:352-353

New Features

Cross-Compilation Profiles

Define reusable cross-compilation configurations and switch between them with a single flag.

cforge build --profile android-arm64
cforge build -P raspberry-pi

Features:

  • Reusable profiles via [cross.profile.<name>] configuration
  • Environment variable expansion in toolchain paths (e.g., ${ANDROID_NDK})
  • Custom CMake variables per profile

Updated Cross-Compilation Configuration

New unified [cross] section format:

[cross]
enabled = true

[cross.target]
system = "Linux"
processor = "aarch64"
toolchain = "path/to/toolchain.cmake"

[cross.compilers]
c = "/usr/bin/aarch64-linux-gnu-gcc"
cxx = "/usr/bin/aarch64-linux-gnu-g++"

[cross.paths]
sysroot = "/path/to/sysroot"
find_root = "/path/to/find/root"

[cross.variables]
MY_VAR = "value"

Documentation

GitHub Pages Workflow Fix

  • Fixed deploy-docs.yml to use cforge-web directory instead of docs
  • Documentation now rebuilds when README.md or cforge-web/** changes

Updated Documentation Pages

Page Changes
cross-compilation.md Complete rewrite with profiles, examples, and troubleshooting
project-configuration.md Updated to match current config format (cpp_standard, binary_type, build.config.<name>)
dependencies.md Added system dependencies (find_package, pkg_config, manual), subdirectory dependencies
workspaces.md Updated workspace commands and project dependency format

Files Changed

  • src/core/command_build.cpp — Cross-compilation profiles, --profile flag, hash fix
  • src/core/command_init.cpp — Updated template with cross-compilation profiles
  • src/core/command_help.cpp — Added --profile flag to help text
  • .github/workflows/deploy-docs.yml — Fixed to use cforge-web
  • cforge-web/docs/*.md — Multiple documentation updates

Note: All existing workflows remain compatible.

Please report issues at [github.com/ChaseSunstrom/cforge/issues](https://github.com/ChaseSunstrom/cforge/issues)