-
Notifications
You must be signed in to change notification settings - Fork 24
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
Stringify CMake command-line arguments before they are added as compile definitions #494
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
cmake-init-include |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reset to master when merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!
Needed for: lf-lang/lingua-franca#2432
The paths to the source directory, binary directory and src-gen directory are passed to CMake as command line arguments. They are originally passed as strings using quotation marks. In the LF change linked I remove the quotation marks because it means you cannot easily use them in CMake. I think these paths are most useful for the user when he adds a cmake-include.
So in this PR I add quotation marks to the paths before they are made into compile definitions so that they conveniently can be used in the user C code as well.