-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix cmake handling of paths with spaces (RP2040) #1255
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: TankedThomas <[email protected]>
Thank you @TankedThomas for your contribution. The changes look correct to me. I have approved the CI check run - let us see if that passes successfully. |
@TankedThomas Thank you for your contribution, I've checked the RP2040 port part in |
@AhmedIsmail02 I think this is because CMake looks for whitespace to separate arguments before it evaluates any variables.
Here double quotes are needed , To prevent CMake from treating the spaces in the expression as argument separators.
No quotes are needed around the final $IF:... generator expression in the above, due to lack of white spaces. In the similar way, in RP2040 port part in |
@kar-rahul-aws Thanks for your reply, As far as I understand and according to your reply I think some of the changes are not needed since CMake looks for white spaces separator before evaluating variables. Hence, paths containing white spaces shouldn't be an issue in that case. I believe that wrapping strings between double quotes is generally the safer option, but it might be a bit confusing for users/developers if it's not consistent. |
I agree; the issue doesn't identify which unquoted paths are a problem; i think it would be much preferable to only modify those if the number is limited |
I assume it is just the |
@TankedThomas Can you please check @kilograham's suggestion and limit the changes to only the required ones? |
Sorry everyone, really busy this week. I'll get back to you ASAP but it probably won't be until the end of next week. |
|
Fix cmake handling of paths with spaces
Description
Double quotes are added to cmake variables in order to handle pathname spaces (or other special characters).
Test Steps
When building with the related cmake files over on the raspberrypi/debugprobe repo, I ran into issues with my pathnames having spaces in them.
The same thing might happen here, so the maintainers of debugprobe suggested pushing this fix upstream.
Checklist:
I'm not sure how to build FreeRTOS to test, but this should work fine according to my tests with raspberrypi/debugprobe
I don't believe unit test changes should be necessary here.
Related Issue
Related raspberrypi/debugprobe pull request
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.