Skip to content

CXX-2971 Fix bsoncxx package name in pkg-config requires field #1103

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 3 commits into from
Feb 29, 2024

Conversation

eramongodb
Copy link
Contributor

Resolves CXX-2971.

#1081 failed to account for ENABLE_ABI_TAG_IN_PKGCONFIG_FILENAMES=OFF when generating pkg-config filenames (it works correctly when ENABLE_ABI_TAG_IN_PKGCONFIG_FILENAMES=ON). The "Requires" field for pkg-config files uses the package name, not the library filename. This PR ensures the bsoncxx library's pkg-config package name is used for the Requires field, not the library filename.

The current EVG config does not appear to cover pkg-config on Windows. Testing pkg-config on Windows is currently being done manually and locally, which this PR proves to be insufficient. Filed CXX-2973 to track the addition of test coverage of pkg-config on Windows.

Some additional drive-by fixes/improvements:

  • Defer proper escaping and quotation of command-line arguments to CMake by using the form "KEY=${VALUE_MAY_CONTAIN_SPACES}" rather than KEY="${VALUE_MAY_CONTAIN_SPACES}".
  • Address warnings generated during numeric comparison of version numbers by omitting "extra" content from the pkg-config version numbers.

@eramongodb eramongodb requested a review from kevinAlbs February 29, 2024 17:54
@eramongodb eramongodb self-assigned this Feb 29, 2024
eramongodb referenced this pull request Feb 29, 2024
* Add ABI tag to library filenames on Windows

* Update API/ABI documentation with Windows library filename description
@eramongodb eramongodb merged commit f06878f into mongodb:master Feb 29, 2024
@eramongodb eramongodb deleted the cxx-2971 branch February 29, 2024 20:19
eramongodb added a commit to eramongodb/mongo-cxx-driver that referenced this pull request Feb 29, 2024
…db#1103)

* Depend on CMake to handle quoting of command-line arguments correctly

* CXX-2971 Fix bsoncxx package name in pkg-config requires list

* Address "argument isn't numeric in numeric comparison" pkg-config warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants