Improve modern CMake usage
Summary: Summary of the changes --- - Fix broken MSVC build: - Compiling `GenerateFingerprintTables.cpp` complained about missing header file `glog/logging.h`. - Targets `GenerateFingerprintTables` and `folly_fingerprint` don't specify `FOLLY_INCLUDE_DIRECTORIES` in its include directories. * Introduce a "shiny" target `folly_deps` for managing folly's dependencies and interface specification. * `folly_deps` is an [INTERFACE library target](https://cmake.org/cmake/help/v3.0/command/add_library.html). * It encapsulates the interface dependencies (compile definitions, include directories, link libraries, etc.) for other targets. * The usage of the new target is clean and simple: `target_link_libraries(<target_name> (PUBLIC|PRIVATE) folly_deps)` (except for OBJECT library targets, like `folly_base` - included in the change). Possible modifications --- The name `folly_deps` could be replaced with a better one. The target can be extended to include the PUBLIC compile options set on individual targets. Reviews and suggestions welcome. Closes https://github.com/facebook/folly/pull/818 Reviewed By: simpkins Differential Revision: D7642870 Pulled By: Orvid fbshipit-source-id: c1c5fdae67f5a677c82f05757217af6b6de9db02
Showing
Please register or sign in to comment