Commit Graph

24 Commits

Author SHA1 Message Date
Chad Austin
8925b1dcb8 remove ThriftCppLibrary.cmake as getdeps provides it
Summary: ThriftCppLibrary.cmake is a duplicate of the getdeps/opensource copy of the file. To avoid issues with keeping them in sync, remove Eden's.

Reviewed By: simpkins

Differential Revision: D15750453

fbshipit-source-id: 7f95d01c4ed6ce3af86f0215ef16b88dc2c61027
2019-06-17 11:10:33 -07:00
Puneet Kaushik
531154d281 Add FindPrjfs to locate Projected FS sdk.
Summary: This is a stop gap solution to get the Windows build working with the getdeps, until we fix the SDK.

Reviewed By: chadaustin

Differential Revision: D15536740

fbshipit-source-id: 77cc6ea80c304a6cfcd0180bb28f63ce4dac2988
2019-05-31 16:16:23 -07:00
Puneet Kaushik
33352a66fe Define EDEN_WIN for Mercurial cdatapack
Summary: scm/hg/lib/clib/portability/mman.h needs EDEN_WIN macro defined to include the correct definition for Eden Windows.

Reviewed By: wez

Differential Revision: D15251101

fbshipit-source-id: 9ecf55f03aac2618398ed4c962d2e210e488b724
2019-05-09 16:33:08 -07:00
Wez Furlong
d0c7e1ccb9 eden: cmake: initial support for running unit tests
Summary:
beholdunittests

This enables some plumbing for running some of the
tests using the gtest/gmock machinery in cmake.

Part of this diff is removing the FindGMock.cmake file from the
eden repo; we now pull this in from the shared cmake library
that is populated by shipit.

Reviewed By: simpkins

Differential Revision: D14993344

fbshipit-source-id: 51caf9518c7f3a083a3b90cda10324c3a8170359
2019-05-03 15:59:45 -07:00
Wez Furlong
12b0708dd8 eden: getdeps: add fb-mercurial dep to enable treemanifest
Summary:
In order to pull in the treemanifest and other libraries
from our mercurial repo, add a manifest file for it, and then
adjust the logic in our cmake module to look for it.

The fb-mercurial manifest just copies the source tree to the
installation dir.  In the future, we could teach it to invoke
the build for real.

Reviewed By: simpkins

Differential Revision: D14969806

fbshipit-source-id: cb270c5003a1c134eeea92c7481a84938f1c5957
2019-05-03 15:59:44 -07:00
Chad Austin
2267e75bda require treemanifest support
Summary: We intend to break support for flatmanifest hg, so require that treemanifest is available in the build.

Reviewed By: wez

Differential Revision: D15057150

fbshipit-source-id: 449399cfb9d018f3b722598091eead1bd5d7c77d
2019-05-02 12:35:21 -07:00
Wez Furlong
cccc64752c eden: add fmt to cmake deps
Summary:
Folly and thrift now require fmt, so we have to probe for it before
we probe for folly.

Reviewed By: chadaustin

Differential Revision: D15165394

fbshipit-source-id: 00d5f0cd5e9421ce0e3a4ea0de850deb4d4b5e3f
2019-05-01 16:10:23 -07:00
Joe Loser
14e791a7dc Don't clobber CXXFLAGS/CMAKE_CXX_FLAGS (#8)
Summary:
- CMake allows the user to add additional compilation options using
  `CXXFLAGS=<flags>` or `-DCMAKE_CXX_FLAGS=<flags>`.
- Eden clobbers these CMAKE_CXX_FLAGS for both debug and release modes
  which prevents the user from passing additional flags.
- Teach Eden to respect user-supplied compiler flags instead of simply
  overriding them.
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/8

Reviewed By: simpkins

Differential Revision: D14481846

Pulled By: wez

fbshipit-source-id: 4d2034ddb4f9b781dde603a140c4d199eb0ad7d6
2019-05-01 10:15:09 -07:00
Wez Furlong
de7f624497 eden: cmake: fixup adding libgit2 options to target
Summary:
`target_link_libraries` only allows passing things that
are libraries and expressly forbids passing in `-framework Foo`,
which is the sort of thing we get back from pkg-config on macos.
The result of misusing this is that cmake would add `["-framework", "-lFoo"]`
to the argv for the linker, which is totally broken.

Instead, we should use `target_link_options`.

Unfortunately, cmake seems to fail to do the right thing with the
` -framework CoreFoundation -framework Security` flags returned
from libgit2 on my system even using `target_link_options`; it somehow
ends up with a bare `Security` and fails to link.  meh.

Reviewed By: strager

Differential Revision: D14680672

fbshipit-source-id: 62f65ddb4d07c8194cfc453cef1349b01be6c8b3
2019-03-29 15:02:04 -07:00
Wez Furlong
f8099e5129 eden: cmake fixup include directories and deps
Summary:
While testing out the new getdeps code I found that none
of the include directories from the probed libraries were being used.

The new getdeps installs each dep into its own prefix, whereas the
existing getdeps script installed them into the installation
prefix for eden itself.  That meant that they were being implicitly
found from a single include directory.

In addition to this, I encountered linker failures for the pretty
printers; the solution to those was to add appropriate deps for
the modules that depend upon the pretty printers.

Reviewed By: pkaush

Differential Revision: D14638758

fbshipit-source-id: a4c2b4c79603c268e1b1c707a05c3cb0e3f2757b
2019-03-28 20:57:17 -07:00
Zeyi Fan
21a6606e1f Add MononokeCurlBackingStore
Summary: This diff add a MononokeBackingStore implemented based on libcurl so we could add Mononoke support on macOS.

Reviewed By: chadaustin

Differential Revision: D14096313

fbshipit-source-id: 2bcb0c49002dcbb0a0190ba505a6e814e74db747
2019-03-11 14:34:08 -07:00
Matt Glazar
49f4c37b67 Add missing copyright notices
Summary: Internal Facebook infrastructure is nagging me about some files not having a Facebook copyright notice. Add a notice to these files to make the nagging stop.

Reviewed By: simpkins

Differential Revision: D14173944

fbshipit-source-id: 7234431224fcf4f86ea56ca2f9108f47ef959d87
2019-03-07 19:32:39 -08:00
Wez Furlong
63d868548f eden: reinstate treemanifest support on macos
Summary:
This got lost partly because the symlink/shipit bit
was a manual step when I did this first time around, and partly
because the mercurial code got refactored.

Restoring treemanifest restores `hg up` performance to saner
levels.

This is fairly straightforward, but now that we have !wez building this we've
found that my machine had lz4 installed in the default include path and that we
need to probe and find the correct one, so that is part of this diff also.

Reviewed By: simpkins

Differential Revision: D14078886

fbshipit-source-id: 971cd49757bbb7dcc484439e6d896698598a583b
2019-02-14 22:27:00 -08:00
Wez Furlong
1752348eef eden: wire up mac contbuild
Summary:
Make `build-oss.sh` actually run the cmake build.
At the moment this is only run from nbtd for mac platforms,
so that is all that I've tested with it.

This is similar to the the equivalent scripts for watchman.
In a later diff we can centralize and clean up the duplication.

Reviewed By: simpkins

Differential Revision: D13910031

fbshipit-source-id: 6a7250c22033e913d999cf928fed27dada0647ef
2019-02-05 21:52:30 -08:00
Wez Furlong
a545acbbd4 eden: add C datapack/treemanifest to cmake build
Summary:
This requires our mercurial repo to be available during
the build; I symlink it in alongside `common` in the `oss` dir,
and point it up to `scm/hg`.

This has partial support for mononoke too, but will need to add
logic to getdeps to pull down the proxygen repo and build that.

Reviewed By: simpkins

Differential Revision: D13480146

fbshipit-source-id: 54874245015af83a259f56944d2e5f87615baee7
2019-01-17 18:52:53 -08:00
Wez Furlong
d235a744ab eden: compiler settings tweaks for oss build
Summary:
There are some features of folly futures that are
currently being deprecated.  Until that codemod lands, deprecation
warnings have been disabled in the buck build.  To avoid
swamping the build output in the oss build, let's also turn
them off for cmake.

Reviewed By: strager

Differential Revision: D13686585

fbshipit-source-id: 14609a882bc78b7b31beb7ae02d762b9318e1312
2019-01-16 14:40:20 -08:00
Wez Furlong
98d551fe96 eden: pull in glog::glog in order to satisfy folly cmake deps
Summary:
This is necessary because the folly installed cmake config
advertises that it requires glog::glog but doesn't specify how to
find it.

See also D13482288

Reviewed By: simpkins

Differential Revision: D13486767

fbshipit-source-id: 0713ae70a1863fc23a5e86c21e8f72e3ba9e4ed2
2019-01-15 14:14:32 -08:00
Wez Furlong
1b5709f273 eden: fixup cmake defines for some optional features
Summary:
a couple of parts of the rust, datapack and mononoke code
didn't have appropriate definitions.

Allow `useDatapackGetBlob_` to be default initialized per its
definition in the header file rather than replicating the relatively
complex ifdef logic in the implementation.

Reviewed By: strager

Differential Revision: D13475710

fbshipit-source-id: d2955c9b22f1186f5897aa8bdbd9046b8f6b5f7a
2018-12-17 20:16:19 -08:00
Adam Simpkins
5d369296e8 cmake: compile with -std=gnu++1z
Summary:
Tell the compiler that we want to enable C++17 features.
This is required in order to use `std::is_default_constructible_v`, and it
prevents the compiler from warning about structured binding declarations.

Reviewed By: chadaustin, strager

Differential Revision: D10503904

fbshipit-source-id: 8fc521abdb261c787eabb3908bf7d4c2c8e46f2b
2018-10-23 13:42:12 -07:00
Adam Simpkins
1b4ecb3ed4 update the CMake based build with new dependencies
Summary:
Our CMake-based build had gotten somewhat out of date.  This fixes several
issues that were preventing it from building:
- wangle now depends on fizz, which in turn depends on libsodium
- fbthrift now depends on yarpl for the streaming functionality
- Eden now depends on libsqlite3
- The eden/fs/inode library now depends on eden/fs/config

Reviewed By: strager

Differential Revision: D10436531

fbshipit-source-id: f41065da2edb909e8eb94e03d0e62ae19ad3a84f
2018-10-23 13:42:12 -07:00
Matt Glazar
34eeb349ae Add opt-in for experimental systemd mode
Summary:
To ease the migration from the current custom daemon setup to a systemd-managed daemon, add a way to enable the to-be-implemented systemd behavior.

* To the edenfs daemon, support the --experimentalSystemd option.
* To the Eden CLI, support the EDEN_EXPERIMENTAL_SYSTEMD environment variable. When set, invoke the edenfs daemon with --experimentalSystemd.

Aside from adding a log message, this diff does not change any behavior. This diff just sets up scaffolding for future diffs.

Reviewed By: simpkins

Differential Revision: D10248055

fbshipit-source-id: 30ca5a4bfde00ff43fd6f2a5d0282ced4f177fed
2018-10-22 20:27:25 -07:00
Yedidya Feldblum
45b6f1e59f Rename generated client source file
Summary: [Thrift] Rename generated client source file for consistency with the recently-added header. The new generated client source file is `{Service}AsyncClient.cpp`.

Reviewed By: stevegury

Differential Revision: D9174822

fbshipit-source-id: 49a050a96d3f583fdb5ad56545ca4a16d31605d7
2018-08-07 17:22:13 -07:00
Jun Wu
fae2056037 do not require SELinux in GitHub build
Summary:
I tried to build eden using GitHub version and ran into SELinux issues.
This patch fixed related issues, namely:

- `set(X Y)` sets X to string literal Y. Change it to `set(X ${Y})`.
- `SELINUX_INCLUDE_DIR` could be undefined. Check before use it.
- `./eden/fs/eden-config.h` and `./build/eden/fs/eden-config.h` both exist and
  the former is used. Set include dirs so the latter gets used.

Reviewed By: bolinfest

Differential Revision: D9029272

fbshipit-source-id: 0c94bbe2f9e3fa90973802ddde16ad4d9ddfc0e8
2018-07-27 13:22:57 -07:00
Adam Simpkins
dea514bbef add CMake build files
Summary: Add CMakeFiles to build Eden.

Reviewed By: wez

Differential Revision: D7479587

fbshipit-source-id: 7e0b4a756005dadc3af5c13c36ce22d1dcc15071
2018-04-30 14:37:46 -07:00