-
Notifications
You must be signed in to change notification settings - Fork 912
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
refactor: Use FetchContent for integrating three bundled libs #3107
refactor: Use FetchContent for integrating three bundled libs #3107
Conversation
/milestone 0.38.0 |
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.
/approve
LGTM label has been added. Git tree hash: 425fd2f9b0bed58b08634efa5789766de2449da4
|
800e72c
to
c9bd179
Compare
#define CPPHTTPLIB_OPENSSL_SUPPORT | ||
#define CPPHTTPLIB_ZLIB_SUPPORT |
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.
These two defines were resulting in a warning that the definition was already present.
c9bd179
to
3867147
Compare
Ehy @federico-sysdig can you rebase? It should fix CI issues! |
Signed-off-by: Federico Aponte <[email protected]>
Signed-off-by: Federico Aponte <[email protected]>
3867147
to
51bfa9b
Compare
@FedeDP Sure. Done! |
Signed-off-by: Federico Aponte <[email protected]>
51bfa9b
to
9498ee8
Compare
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.
LGTM label has been added. Git tree hash: 49b7a5a713ef9b7607c714d433739c384e82f1fc
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, federico-sysdig, jasondellaluce, leogr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/unhold |
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area build
What this PR does / why we need it:
Libraries
nlohmann-json
,yaml-cpp
, andcpp-httplib
in their "bundled" configuration are now integrated through the CMake constructFetchContent
rather thanExternalProject_Add
. This has the benefit of being treated in a way similar to integrating the library withfind_package
, thus making the bundled/non-bundled approach similar in the rest of the code.One important beneficial consequence is the simplification in client code: new targets can reference
falco_engine
without having to specify these libs in their include path or explicitly link against it, because the targetfalco_engine
brings all the needed properties on board through the usage of aliases such ashttplib::httplib
ornlohmann_json::nlohmann_json
.The libraries have also been upgraded as newer versions provide the target aliases and allow integration with
FetchContent
without building the library's test targets, which obviously Falco doesn't need.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: