Repository navigation
beta-v2.3.2
Pre-releaseCForge 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:
- First tries standard
remove_all - If that fails, makes all files writable and retries
- On Windows, falls back to
rmdir /s /q - 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)