-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
CMake: Handle generator expressions requiring a target for pkg-config #1433
Conversation
Hi @tambry! Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
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.
@Orvid has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Thanks for the fix. I hit this issue as well. |
CMake's find modules may have target-based generator expressions, which get propagated to us when generating the pkg-config file. CMake 3.19 introduces the TARGET argument to file(GENERATE), which allows resolving such generator expressions and will avoid future issues. A workaround proposed by @adriaandegroot is added for CMake 3.18. Additionally changed list->string conversion to use list(JOIN) instead of string replacement. Fixes #1414.
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.
@Orvid has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: VERSION_GREATER 3.18 also matches 3.18.2, which is wrong as the target argument was only added in 3.19. After noticing that folly requires an ancient CMake version I converted over from VERSION_GREATER_EQUAL and introduced the comparison error. Issue reported [here](#1433 (comment)). Pull Request resolved: #1439 Reviewed By: yfeldblum Differential Revision: D23564812 Pulled By: Orvid fbshipit-source-id: 19881876147ec73ad70610cf97c408740f998340
…facebook#1433) Summary: CMake's find modules may have target-based generator expressions, which get propagated to us when generating the pkg-config file. CMake 3.19 introduces the TARGET argument to file(GENERATE), which allows resolving such generator expressions and will avoid future issues. A workaround proposed by adriaandegroot is added for CMake 3.18. Additionally changed list->string conversion to use list(JOIN) instead of string replacement. Fixes facebook#1414. Pull Request resolved: facebook#1433 Reviewed By: yfeldblum Differential Revision: D23433365 Pulled By: Orvid fbshipit-source-id: 6ef5f180e13b41f0c92137f53fd8c19ba6355dd6
Summary: VERSION_GREATER 3.18 also matches 3.18.2, which is wrong as the target argument was only added in 3.19. After noticing that folly requires an ancient CMake version I converted over from VERSION_GREATER_EQUAL and introduced the comparison error. Issue reported [here](facebook#1433 (comment)). Pull Request resolved: facebook#1439 Reviewed By: yfeldblum Differential Revision: D23564812 Pulled By: Orvid fbshipit-source-id: 19881876147ec73ad70610cf97c408740f998340
CMake's find modules may have target-based generator expressions, which get propagated to us when generating the pkg-config file.
CMake 3.19 introduces the TARGET argument to file(GENERATE), which allows resolving such generator expressions and will avoid future issues.
A workaround proposed by @adriaandegroot is added for CMake 3.18.
Additionally changed list->string conversion to use list(JOIN) instead of string replacement.
Fixes #1414.