-
Notifications
You must be signed in to change notification settings - Fork 546
Auto download C Driver #967
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
Auto download C Driver #967
Conversation
7d222a9
to
cd6f3e2
Compare
Co-authored-by: vector-of-bool <[email protected]>
Co-authored-by: vector-of-bool <[email protected]>
Co-authored-by: vector-of-bool <[email protected]>
Co-authored-by: vector-of-bool <[email protected]>
Co-authored-by: vector-of-bool <[email protected]>
Co-authored-by: vector-of-bool <[email protected]>
Co-authored-by: vector-of-bool <[email protected]>
Co-authored-by: vector-of-bool <[email protected]>
Co-authored-by: vector-of-bool <[email protected]>
Co-authored-by: Roberto C. Sánchez <[email protected]>
.evergreen/compile.sh
Outdated
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.
I expect the automatic C driver install may be the default process for new users installing the C++ driver from source.
I suggest:
- Update most tasks in Evergreen to remove the
install_c_driver
function and instead rely on theAuto download C Driver
feature. That may provide more test coverage over the default process. - Add one task that uses
install_c_driver
to test building with a separate C driver install.
@@ -69,7 +66,6 @@ else() | |||
find_package(libmongoc-${LIBMONGOC_REQUIRED_ABI_VERSION} ${LIBMONGOC_REQUIRED_VERSION} REQUIRED) | |||
message ("found libmongoc version ${MONGOC_VERSION}") | |||
set(libmongoc_target ${MONGOC_LIBRARIES}) | |||
set(libmongoc_include_directories ${MONGOC_INCLUDE_DIRS}) |
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.
Is libmongoc_include_directories
not needed? libmongoc_include_directories
is referenced in MongocxxUtil.cmake.
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.
This was removed by the following suggestion. @vector-of-bool would you please be able to chime in on the reason for requesting this change?
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.
If you link to the libmongoc imported targets, the headers search paths for libmongoc will be propagated into users automatically.
Co-authored-by: Kevin Albertson <[email protected]>
Co-authored-by: Kevin Albertson <[email protected]>
Co-authored-by: Kevin Albertson <[email protected]>
Co-authored-by: Kevin Albertson <[email protected]>
Co-authored-by: Kevin Albertson <[email protected]>
Co-authored-by: Kevin Albertson <[email protected]>
Co-authored-by: Kevin Albertson <[email protected]>
Co-authored-by: Kevin Albertson <[email protected]>
Co-authored-by: Kevin Albertson <[email protected]>
Co-authored-by: Kevin Albertson <[email protected]>
Co-authored-by: Kevin Albertson <[email protected]>
CMakeLists.txt
Outdated
) | ||
|
||
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") | ||
set(CMAKE_C_FLAGS -Wno-error) |
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.
I think that you will get a better result by doing something like this:
# Disable all warnings for compiling the C driver
target_compile_options (mongo::mongoc_shared PRIVATE -w)
target_compile_options (mongo::mongoc_static PRIVATE -w)
This would go after the add_subdirectory
call and would replace all of the flag manipulation you have here.
For reference, this idea is based on what we do with zlib, in src/libmongoc/CMakeLists.txt:L78-79
.
Co-authored-by: Roberto C. Sánchez <[email protected]>
Co-authored-by: Kevin Albertson <[email protected]>
This reverts commit de87767.
Co-authored-by: Kevin Albertson <[email protected]>
Co-authored-by: Kevin Albertson <[email protected]>
CXX-2695