-
Notifications
You must be signed in to change notification settings - Fork 456
CDRIVER-3091 fix copyrights and OriginalFilename
#1457
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5b043b0
to
8db99b8
Compare
The MinGW resource compiler (windres) does not appear to keep quotes on arguments passed to the preprocessor.
8db99b8
to
7ba863f
Compare
eramongodb
requested changes
Oct 27, 2023
For consistency with C++ driver.
kevinAlbs
commented
Oct 27, 2023
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.
Latest commit verified with this patch: https://spruce.mongodb.com/version/653bd5b657e85a951471ce5a
eramongodb
reviewed
Oct 27, 2023
eramongodb
approved these changes
Oct 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR is a follow-up to #1451 and updates to the added
.rc
files:MONGOC_OUTPUT_BASENAME
andBSON_OUTPUT_BASENAME
to defineOriginalFilename
.rc
files withconfigure_file
.Verified with this patch: https://spruce.mongodb.com/version/653b0df40ae606a657a0ff91
Background & Motivation
Use of
OUTPUT_BASENAME
and updating the copyright date were identified in mongodb/mongo-cxx-driver#1046 when adding.rc
files for the C++ driver.Using
configure_file
Generating the
.rc
files withconfigure_file
was motivated by an observed issue with MinGW builds.An initial attempt to pass
BSON_OUTPUT_BASENAME
set a quoted value in CMake:This worked for MSVC, but resulted in this error on MinGW.
MinGW uses GNU
windres
as the resource compiler.Using
-DCMAKE_VERBOSE_MAKEFILE=ON
showed thewindres
command included the argument-DBSON_OUTPUT_BASENAME=\"bson\"
:Running the same
windres
command with--verbose
showed the argument passed to the preprocessor command without backslashes (-DBSON_OUTPUT_BASENAME="bson"
):This resulted in the
BSON_OUTPUT_BASENAME
macro substituted without quotes:To work around, the
configure_file
is used to create the.rc
files at configure time with variables substituted:windres handling of quoting is noted in https://sourceware.org/bugzilla/show_bug.cgi?id=27594#c2: