Commit Graph
3 Commits
Author SHA1 Message Date
Gil b15283bd27 Build gRPC for Firestore C++ (#652)
* Clean up quoting and other minor issues

* Reorganize CMake build output

Make it clearer which parts of the output pertain to external projects.

* Use a consistent ordering of ExternalProject arguments

* Prevent the top-level build from running in parallel

This prevents spurious failures when running make -j.

* Actually parse arguments in the xcodebuild function

* Use ExternalProject features when available

  * submodule limits from CMake 3.0
  * shallow clones from CMake 3.6
  * git progress output from CMake 3.8

* Only build the parts of leveldb we need

Skip building the tools and other libraries

* Avoid installing ExternalProjects

Consume build output directly so that we can build just the targets we
need. Installing causes all targets to be built.

This doesn't matter as much for these targets but the gRPC build
includes a ton of stuff we don't need so it's worth adopting this as a
general strategy.

* Define an external build for grpc

* Test that grpc can link successfully.

* Add a FindGRPC CMake module

* Actually comment ExternalProjext_GitSource
2018-01-13 15:21:01 -08:00
Gil 5a6155f6a3 Build and test both C++ loggers where possible (#595)
* Rename FIREBASE_BINARY_DIR to FIREBASE_INSTALL_DIR

  Make this consistent with the outer superbuild and also make the
  association with CMAKE_INSTALL_PREFIX more obvious.

* Build and test log_stdio separate from the rest of util

  This is in preparation for adding a test for log_apple

* Build and test log_apple under CMake

  Also add notes about how FIRLogger's debug mode can break this test

* Refactor log_apple to cut down duplicate switch statements

  There's also a slight reduction in final binary size.
2018-01-03 07:00:54 -08:00
Gil 87d88ebbe2 Add leveldb to the Firestore cmake build (#559)
* Use Debug as the default build type if unspecified

* Add a leveldb ExternalProject, FindLevelDB module, and use it in Firestore

* Accept an externally built leveldb via LEVELDB_ROOT

* Clone leveldb via https: instead of git:

* Remove extra DOWNLOAD_DIR which doesn't work with GIT sources
2017-12-12 11:13:02 -08:00