The call to include(FetchMongoC) which conditionally imports the auto-downloaded C Driver comes before top-level CMake cache variables such as ENABLE_TESTS are defined with option() or set(CACHE). This allows the imported C Driver to initialize the cache variable before the C++ Driver, which leads to the C++ Driver's default value being ignored due to the cache variable already being defined by the C Driver. This results in the ENABLE_TESTS=OFF default intended by CXX-3179 having lower priority than the C Driver's default of ENABLE_TESTS=ON.
- is related to
-
CXX-3179 Disable ENABLE_TESTS by default
-
- Closed
-