watchman: pull in thrift in the oss build for eden support

Summary:
This diff enables building the eden watcher by linking in thrift and
its various dependencies.

To support building in-fbsource and in the github repo, a `maybe_shipit_dir`
function is used to setup a symlink to the `eden` and `fboss/common` dirs (this
mirrors the shipit configuration for this project: we cannot simply run shipit
because we have to build on mac and windows and shipit requires Hack, and that
does not support those platforms).

I tried to persuade cmake to let me build this without the use of a symlink but
found it too difficult to teach everything about the path mapping.  The
symlinks aren't terrible, but are the reason why this diff also updates some
`.gitinore` files that are seemingly unrelated to this diff.

This diff changes a couple of build/link options: without them the end product
fails to link either due to implicit/unilateral enablement of UBSAN in some of
the deps, or because warning->error promotion is turned on.

This diff includes a copy of the `ThriftCppLibrary.cmake` file from the fboss
repo.  This should get centralized and shipit'ed out into the places that
consume it.  That can be done when someone gets around to doing the same for
the `FindGlog.cmake` file and doesn't need to hold up this diff.

Reviewed By: simpkins

Differential Revision: D13486486

fbshipit-source-id: 3bb5b011771b2a87618147ca019b4e50a8e0aaf2
This commit is contained in:
Wez Furlong 2019-02-04 21:34:59 -08:00 committed by Facebook Github Bot
parent e92d26d9cc
commit cd5b4b6d92
3 changed files with 7 additions and 0 deletions

5
common/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
/CMakeFiles
/CTestTestfile.cmake
/Makefile
/cmake_install.cmake
/lib*.a

1
common/fb303/if/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/gen-cpp2

1
eden/fs/service/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/gen-cpp2