-
Notifications
You must be signed in to change notification settings - Fork 373
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
cleanup: Use only find_package to find dependencies. #2967
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2967 +/- ##
==========================================
+ Coverage 90.66% 90.66% +<.01%
==========================================
Files 299 299
Lines 20204 20213 +9
==========================================
+ Hits 18317 18326 +9
Misses 1887 1887
Continue to review full report at Codecov.
|
With the new configuration the dependencies are compiled with slightly different options. That confuses the API/ABI baseline tools.
/cc: @tmatsuo @remyabel because you are interested in this type of change. |
@remyabel @googleapis/yoshi-cpp if you are doing development for |
FindProtobufWithTargets | ||
------------------- | ||
|
||
A module to use `Protobuf` with less complications. |
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.
Nit: since this is following RST syntax, it should use two backticks.
- It fallsback on the ``FindProtobuf`` module if the config files are not found. | ||
- It populates any missing targets and their properties. | ||
|
||
The following :prop_tgt:`IMPORTED` targets are defined: |
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.
Nit: :prop_tgt
is a Sphinx directive. We probably don't care about it, we can just do IMPORTED with two backticks.
@@ -45,7 +45,7 @@ if (TARGET storage-docs AND TARGET cloud-docs) | |||
endif () | |||
|
|||
include(IncludeNlohmannJson) |
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.
@coryan Can we use the cmake files provided by the nlohmann json package, instead of fetching it manually via cmake?
$out/include
$out/include/nlohmann
$out/include/nlohmann/json.hpp
$out/lib
$out/lib/cmake
$out/lib/cmake/nlohmann_json
$out/lib/cmake/nlohmann_json/nlohmann_jsonConfig.cmake
$out/lib/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake
$out/lib/cmake/nlohmann_json/nlohmann_jsonTargets.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.
See #2874. We have not had time to do that, but yes, it makes sense.
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.
Thanks, subscribed to that issue now.
This PR changes the CMake files to use
find_package()
exclusively whenlooking for dependencies. To automatically download the dependencies the
project can be embedded in a larger "super build".
There are still some places where we use
find_package()
through a helperfile, because different versions of the CMake module (or config file) behave
differently and we want to manage those differences in one place.
This fixes #2802
This change is