1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-09-14 01:01:48 +03:00

4 Commits

Author SHA1 Message Date
Wez Furlong
f7e5caf593 oss: FindLibEvent.cmake: workaround cmake POLICY annoyances
Summary:
When pulled in as an external project into an environment
that has changed the default cmake policy, the trick we're using
to extract the full library path errors out.  This works around
that issue by saving the policy settings and then setting them
how we need them before restoring them after we're done.

refs https://github.com/facebook/folly/issues/1100

Reviewed By: yfeldblum

Differential Revision: D14766991

fbshipit-source-id: e2506bc0aebd9e66bc70b12c4c538c9e034f9f73
2019-04-08 10:59:20 -07:00
Wez Furlong
dd8f9e4a72 folly:wangle: fixup libevent detection and export
Summary:
I finally got to the bottom of the weird `-levent` or `event.lib`
linker errors that crop up in the cmake builds.

The issue is that if you have installed a recent libevent it deploys
a cmake CONFIG package that exports just a bare `event` target as the
dep on libevent.  This is unfortunate because it is interpreted as
meaning `-levent` with no library path, which for an installation
of libevent that is not in the default path will result in linker
errors in libraries downstream of folly.

To resolve this, I've given the common `FindLibEvent.cmake` file
(that was derived from the folly library of the same name) a similar
treatment to the recent changes to find glog and taught it how to
locate libevent from a config package and to fall back on a basic
include/library check.

If we find an `event` target then we extract the actual library
path from it and export that.

I've removed folly's and wangle's own FindLibEvent.cmake so that it will pick
up the common library which gets shipit sync'd out to
https://github.com/facebook/folly/blob/master/CMake/FindLibEvent.cmake
and https://github.com/facebook/wangle/blob/master/build/fbcode_builder/CMake/FindLibEvent.cmake

Reviewed By: yfeldblum

Differential Revision: D14702577

fbshipit-source-id: d35d9f741e009dcd77976c0637ba3024a8a4aef3
2019-04-01 19:07:33 -07:00
Saif Hasan
4ac94c0b9e Add copyright headers to new files
Summary:
Copyright header was missing from cmake files and Open Source Bot complained
about it. Adding header to be compliant with our oss policies

Reviewed By: yns88

Differential Revision: D14603978

fbshipit-source-id: fab9e781969e10038537ebbdab87b1272f093bf1
2019-03-25 14:27:21 -07:00
Wez Furlong
bccfaf3823 watchman:folly:thrift:wangle:fizz: move CMake library bits to a central location
Summary:
Use the watchman cmake files to seed the common cmake library and adjust
a number of our opensource projects to take their glog and gflags module
finding from that central location.

Note that there are a variety of ad-hoc re-implementations of shipit in various build scripts used in sandcastle jobs at the moment that result in adding multiple cmake module paths to correctly locate the shared cmake directory.  The long term solution is to get all those projects integrated in the new fbcode_builder stuff that I'm working on.

Reviewed By: simpkins, calebmarchent

Differential Revision: D14549654

fbshipit-source-id: e49a7f20a15af52b4b3ed3037b8973fc293656dc
2019-03-22 16:57:12 -07:00