Skip to content

CDRIVER-4136 Use C99 as default C standard without requiring explicit CMake config variables #1138

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 1 commit into from
Nov 2, 2022

Conversation

eramongodb
Copy link
Contributor

Description

This PR is related to CDRIVER-4136 and is a followup to #1067.

Explicit CMake config variables CMAKE_C_STANDARD, CMAKE_C_STANDARD_REQUIRED, and CMAKE_C_EXTENSIONS that were required by #1067 are now set by default during CMake configuration unless otherwise directed (e.g. passing -DCMAKE_C_STANDARD=11 during CMake configuration). This means the C Driver will now implicitly default to conforming to a minimum C standard (currently C99).

Note: The variables are deliberately set as normal variables, not cache variables, to avoid influencing the state of parent CMake projects that may add_subdirectory() the C Driver, notably libmongocrypt.

Changes verified by this patch.

@eramongodb eramongodb self-assigned this Oct 31, 2022
Copy link
Contributor

@vector-of-bool vector-of-bool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Huzzah!

@eramongodb eramongodb merged commit 8e57f15 into mongodb:master Nov 2, 2022
@eramongodb eramongodb deleted the cdriver-4136 branch November 2, 2022 17:31
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.

3 participants