-
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
[vcpkg.cmake] fix Neumann-A problem with find_package #17955
[vcpkg.cmake] fix Neumann-A problem with find_package #17955
Conversation
function("${VCPKG_OVERRIDE_FIND_PACKAGE_NAME}" z_vcpkg_fp_package_name) | ||
# these variables, as well as any variables matching `z_vcpkg_fp_*`, | ||
# are not reexported to parent scope | ||
set(z_vcpkg_fp_ignored_variables | ||
"^(ARGS|z_vcpkg_fp_.*|CMAKE_FIND_ROOT_PATH|Boost_USE_STATIC_LIBS|Boost_USE_MULTITHREADED|Boost_USE_STATIC_RUNTIME|Boost_NO_BOOST_CMAKE|Boost_COMPILER)$") | ||
|
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 think this should be a macro instead. You can backup the ignored variables and restore them afterwards if necessary or unset them. In the end you are forwarding all the variables any way so why not make it a macro?
else() | ||
list(FILTER z_vcpkg_fp_variable_list EXCLUDE "${z_vcpkg_fp_ignored_variables}") | ||
foreach(z_vcpkg_fp_variable IN LISTS z_vcpkg_fp_variable_list) | ||
set("${z_vcpkg_fp_variable}" "${${z_vcpkg_fp_variable}}" PARENT_SCOPE) |
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.
The problem whatever ${${z_vcpkg_fp_variable}}
is determines the final size of the log. If it is a very big string it will be set numerous times if it is a nested find_package
call. If it would be a macro this would not happen since you don't need to forward!
Just for metrics:
|
Just to give an example:
and there are like screens over screens of those settings in the log. |
@strega-nil, we saw the opencv4 failure starts from this changes, related PR #17983 Could you please take a look?
|
hmm CI seems to not have rebuild the world. Took only 3 mins. |
…oft#17955)" This reverts commit b369b11. This change broke opencv, and it was not noticed since vcpkg.cmake didn't rebuild the world.
vcpkg.cmake is not considered in binary cache hashing. |
Basically, traces with vcpkg.cmake are way too long; this halves or quarters the size of traces (and additionally makes some minor improvements like "working automatically on arm64-osx")