Handle library paths with spaces#487
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on Modified Files with Diff Coverage (1)
🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|
There was a problem hiding this comment.
Pull request overview
This PR updates the CMake generation logic to correctly handle library paths containing spaces by quoting affected target_link_libraries(...) entries, and adds test coverage plus fixture data to validate the behavior.
Changes:
- Quote
target_link_librariesentries that contain spaces during CMake content generation. - Add a unit test covering mixed quoted/unquoted library entries with/without spaces and varying indentation.
- Extend test fixtures to include a library file whose filename contains a space and update the expected generated
CMakeLists.txt.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/data/solutions/blanks/ref/project X.AC6 X+ARMCM0 X/CMakeLists.txt | Updates expected CMake output to include a quoted library path containing spaces. |
| test/data/solutions/blanks/project/project X.cproject.yml | Adds a library file with a space in its filename to the project input fixture. |
| test/data/solutions/blanks/project/project X.AC6 X+ARMCM0 X.cbuild.yml | Adds the space-containing library file as a library category input fixture. |
| test/data/solutions/blanks/project/libr ary.a | Adds a dummy library file fixture whose filename includes a space. |
| pkg/maker/buildcontent.go | Introduces quoteEntry and applies it when emitting target_link_libraries entries. |
| pkg/maker/buildcontent_test.go | Adds a unit test validating quoting behavior for library entries with spaces. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Changes
Checklist