Skip to content

CXX-3288 do not initialize ENABLE_TESTS with the auto-downloaded C Driver #1405

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
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .evergreen/config_generator/components/macro_guards.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def tasks():
Compile.call(
build_type='Debug',
compiler=compiler,
vars={'COMPILE_MACRO_GUARD_TESTS': 'ON'},
)
vars={'COMPILE_MACRO_GUARD_TESTS': 'ON', 'ENABLE_TESTS': 'ON'},
),
],
)
)
Expand Down
3 changes: 3 additions & 0 deletions .evergreen/generated_configs/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14187,6 +14187,7 @@ tasks:
- func: compile
vars:
COMPILE_MACRO_GUARD_TESTS: "ON"
ENABLE_TESTS: "ON"
build_type: Debug
- name: macro-guards-rhel80-clang
run_on: rhel80-large
Expand All @@ -14198,6 +14199,7 @@ tasks:
- func: compile
vars:
COMPILE_MACRO_GUARD_TESTS: "ON"
ENABLE_TESTS: "ON"
build_type: Debug
cc_compiler: clang
cxx_compiler: clang++
Expand All @@ -14211,6 +14213,7 @@ tasks:
- func: compile
vars:
COMPILE_MACRO_GUARD_TESTS: "ON"
ENABLE_TESTS: "ON"
build_type: Debug
cc_compiler: gcc
cxx_compiler: g++
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Changes prior to 3.9.0 are documented as [release notes on GitHub](https://githu

## 4.1.1 [Unreleased]

<!-- Will contain entries for the next patch release. -->
### Fixed

- CMake option `ENABLE_TESTS` (`OFF` by default) is no longer overwritten by the auto-downloaded C Driver (`ON` by default) during CMake configuration.

## 4.1.0

Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ set(BSON_REQUIRED_VERSION 2.0.0)
set(MONGOC_REQUIRED_VERSION 2.0.0)
set(MONGOC_DOWNLOAD_VERSION 2.0.0)

include(FetchMongoC)

# All of our target compilers support the deprecated
# attribute. Normally, we would just let the GenerateExportHeader
# subsystem do this via configure check, but there appears to be a
Expand Down Expand Up @@ -321,6 +319,8 @@ if(ENABLE_TESTS)
enable_testing()
endif()

include(FetchMongoC)

add_subdirectory(src)

add_subdirectory(examples EXCLUDE_FROM_ALL)
Expand Down