Repository navigation
Refactor executable source-package ignores to derive CPack regexes from .gitignore - #22
acdemiralp wants to merge 21 commits into
Conversation
|
Hey @copilot can you also add the .vscode folder to .gitignore just like the .vs folders? |
There was a problem hiding this comment.
Pull request overview
This PR updates the CMake preset schema version across all template variants and extends each template’s .gitignore to ignore Visual Studio workspace artifacts.
Changes:
- Downgrade
CMakePresets.json"version"from 10 to 9 across all templates. - Add a Visual Studio ignore entry to each template’s
.gitignore.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| library/CMakePresets.json | Updates CMake preset schema version. |
| library/.gitignore | Adds Visual Studio ignore pattern. |
| library_with_vcpkg/CMakePresets.json | Updates CMake preset schema version. |
| library_with_vcpkg/.gitignore | Adds Visual Studio ignore pattern. |
| header_only_library/CMakePresets.json | Updates CMake preset schema version. |
| header_only_library/.gitignore | Adds Visual Studio ignore pattern. |
| header_only_library_with_vcpkg/CMakePresets.json | Updates CMake preset schema version. |
| header_only_library_with_vcpkg/.gitignore | Adds Visual Studio ignore pattern. |
| executable/CMakePresets.json | Updates CMake preset schema version. |
| executable/.gitignore | Adds Visual Studio ignore pattern. |
| executable_with_vcpkg/CMakePresets.json | Updates CMake preset schema version. |
| executable_with_vcpkg/.gitignore | Adds Visual Studio ignore pattern. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Addressed in |
|
Hey @copilot can you check if GNUInstallDirs is still used, if not remove it from each template? |
Addressed in |
|
@copilot How can we make run : | |
Use |
The executable template had source packaging logic mixed into
get_cpm, exposed a vague helper API, and fedCPACK_SOURCE_IGNORE_FILESwith values that were not safe CPack regexes. This change isolates the packaging logic behind a gitignore-specific helper and makes the generated ignore rules match CPack’s expectations.Helper API
make_cpack_source_ignore_files_from_gitignore(...)GITIGNORE_PATHOUTPUT_VARIABLEget_cpmto its original responsibilityCPack ignore generation
.gitignoreCPACK_SOURCE_IGNORE_FILESbuild/match the build tree, not unrelated paths such assource/rebuild/....git/excluded explicitlyExecutable template wiring
/tmp/workspace/acdemiralp/cmake_templates/executable/CMakeLists.txtto call the new helper and assign the result intoCPACK_SOURCE_IGNORE_FILES