Skip to content

beta-v2.3.2

Pre-release
Pre-release

Choose a tag to compare

@ChaseSunstrom ChaseSunstrom released this 12 Dec 22:49
· 47 commits to master since this release

CForge Release beta-v2.3.2

Clean Command & Dependency Management Fixes

CForge beta-v2.3.2 is a patch release fixing issues with the clean command on Windows, dependency removal, and CPack license file handling.

Bug Fixes

CPack License File Optional

Problem: CPack always expected a LICENSE file at ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE, causing build errors when no license file existed.

Fix: Made the license file optional by checking if LICENSE, LICENSE.txt, or LICENSE.md exists before setting CPACK_RESOURCE_FILE_LICENSE. If none exist, the variable is simply not set.


Clean Command Fails with FetchContent

Problem: When fetch_content = true, the build/_deps directory contains cloned Git repositories with .git folders. On Windows, these have read-only pack files that cause std::filesystem::remove_all to fail with "Access is denied".

Fix: Added a robust force_remove_directory() function that:

  1. First tries standard remove_all
  2. If that fails, makes all files writable and retries
  3. On Windows, falls back to rmdir /s /q
  4. As a last resort, uses the robocopy mirror trick to force deletion

Clean Command Doesn't Remove cforge.hash

Problem: The cforge.hash file wasn't being cleaned up.

Fix: Added cforge.hash to the list of files cleaned by clean_cmake_files().


Remove Command Doesn't Handle Index Dependencies

Problem: cforge remove <package> only checked [dependencies.git] and [dependencies.vcpkg] sections, but index dependencies (like fmt = "11.1.4") are stored in the main [dependencies] section.

Fix: Added a call to also remove from the main [dependencies] section.


Files Changed

File Changes
src/core/workspace.cpp Optional license file handling for CPack
src/core/command_clean.cpp Robust directory removal, cforge.hash cleanup
src/core/command_remove.cpp Index dependency removal support

All existing workflows remain compatible.

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