-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[cryptopp] Update port to support new pem-pack option #37360
Conversation
@microsoft-github-policy-service agree |
Not entirely sure why |
+ fetchcontent_declare( | ||
+ cryptopp-pem | ||
+ GIT_REPOSITORY "https://github.com/noloader/cryptopp-pem" | ||
+ QUIET | ||
+ ) |
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.
This needs to be fetched in the port rather than being grabbed with FetchContent as the SHA needs to be locked, etc.
) | ||
+ fetchcontent_declare( | ||
+ cryptopp-pem | ||
+ URL "https://github.com/noloader/cryptopp-pem/archive/refs/heads/master.zip" |
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.
This fails 'no changes means no changes'. The same port needs to install the same bits if you build it again the next day; building whatever's in master is not OK.
-DUSE_INTERMEDIATE_OBJECTS_TARGET=OFF # Not required when we build static only | ||
-DCMAKE_POLICY_DEFAULT_CMP0063=NEW # Honor "<LANG>_VISIBILITY_PRESET" properties | ||
-DCRYPTOPP_USE_PEM_PACK=${CRYPTOPP_USE_PEM_PACK} | ||
-Dcryptopp-pem_SOURCE_DIR=${PEM_PACK_SOURCE_PATH} # Usually this would be set when cryptopp-cmake downloads the source, but since we don't, we need to provide it instead |
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'm confused by this... you're adding a patch that tries to download from master but this says it doesn't try to do that?
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 patch is a diff created from the official cryptopp-cmake project that adds pem-pack support as was requested earlier instead of using their master branch. By default, cryptopp-cmake will download the source for both the pem-pack and Crypto++ themselves, but this behaviour is not used by vcpkg and disabled as those fetch_content directives will only execute when CRYPTOPP_SOURCES is not defined.
I can remove those parts from the patch, but it would mean that the resulting project is no longer a proper replica of the cryptopp-cmake with pem-pack changes cherrypicked.
In that case, all the pem-pack feature in vcpkg would do would be manipulating the source list after copying the required files to the right locations, essentially making the pem-pack support and its related options within cryptopp-cmake redundant.
Fixes #31849.
./vcpkg x-add-version --all
and committing the result.