find folly using its installed cmake config file #875
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Find folly using its installed CMake configuration file, and delete the custom
FindFolly.cmake file that was being used previously. The FindFolly.cmake file
did not list all dependent libraries necessary to link statically against
folly. Linking against folly as a shared library is not recommended, as
folly provides no binary compatibility guarantees between changes. folly's
current CMake-based build only builds it as a static library by default.
This also changes the build process to build folly with CMake rather than its
deprecated autotools-based build when RSOCKET_INSTALL_DEPS or INSTALL_FOLLY is
set. Note that the build now happens as part of the
cmake
step, since follymust be installed before we call
find_package()
to find folly.Test Plan:
Tested building rsocket-cpp on an Ubuntu 18.04 host. Confirmed it worked both
with an existing folly installation, as well as when using
INSTALL_FOLLY
tohave rsocket download and build folly as part of its build steps.