-
Notifications
You must be signed in to change notification settings - Fork 6.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
[OSG] new attempt to preserve ARGS #27967
Conversation
if(DEFINED ARGS) | ||
set(z_vcpkg_find_package_${z_vcpkg_find_package_backup_id}_backup_ARGS "${ARGS}") | ||
set(z_vcpkg_find_package_${z_vcpkg_find_package_package_name}_backup_ARGS "${ARGS}") |
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.
I didn't use package_name due to nesting of calls to the same package. E.g. different parts of a nested calls looking up something very common like zlib on different levels. Having a unique id is the only save way to avoid overwriting previous values.
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.
nesting of calls to the same package. E.g. different parts of a nested calls looking up something very common like zlib on different levels
But this would require ZLIB to cyclically request ZLIB again, right? Not just A -> B -> ZLIB + A -> C -> ZLIB.
Though now that you mention it, ZLIB (MODULE) could chain-find ZLIB (CONFIG), so we would need to distinguish those cases :(
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.
find_package(ZLIB NO_DEFAULT_PATH PATHS <somecustompath>)
[<- custom module or config] which then calls the original find_package(ZLIB)
.
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.
FTR the CURL find module calls CURL config.
consider waiting if the issue is still present with #27939 merged. |
Attempts to fix osg build fail on https://dev.azure.com/vcpkg/public/_build/results?buildId=81160&view=results.
Issue: find_package(${ARGS}) fails because ARGS is empty.
Stacking find_package calls within the macro results in ARGS being unset.
Tagging @Neumann-A for review to ensure this still fixes #27498 and #19030