aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/CMakeLists.txt
Commit message (Collapse)AuthorAge
* Convert googletest and nanopb CMake builds to add_subdirectory (#1522)Gravatar Gil2018-07-13
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add a download-only boringssl ExternalProject Match boringssl version to grpc submodule version Note: not yet in use * Split grpc into separate download and build tasks This allows other external targets to download into the gRPC source tree before grpc is actually built. * Convert grpc to an http download * Build googletest with add_subdirectory Also: * Revert library-name modifications in the abseil-cpp build * Move abseil-cpp add_subdirectory build into place * Build nanopb with add_subdirectory * Force nanopb first to work around ODR violations This is a temporary work-around for b/111328563.
* Firestore CMake cleanup (#1510)Gravatar Gil2018-07-11
| | | | | | | | | | | | | | | * Pull out sanitizer options into a separate file * Reorder packages * Remove the extra "external/$target" directory from PREFIX Instead of BINARY_DIR/external/foo/src/foo the contents will be in BINARY_DIR/src/foo. * Make libprotobuf-nanopb targets line up with nanopb's CMakeLists.txt * Fix CMake style
* Split GoogleUtilities from FirebaseCore (#1370)Gravatar Paul Beusterien2018-07-06
|
* Install protobuf during CMake build (#1460)Gravatar Gil2018-06-26
| | | | | | | | | | | | | | * Install protobuf * Use the built-in FindProtobuf.cmake * Add additional build configuration flags * Preserve generator configuration in the protobuf sub-build Without this, the build fails on Win64 because the default configuration builds a Win32 libprotobuf and the Win64 build rejects it. * Wire the installed protobuf into the gRPC build. * Install nanopb
* Install googletest (#1461)Gravatar Gil2018-06-26
| | | Also add FindGMock to Find gmock after installation
* Prepare for installed sub-projects (#1459)Gravatar Gil2018-06-26
| | | | | | | | | | | | | | | * Ignore vim backup files * Prepare for installed subprojects This adds FIREBASE_BINARY_DIR to point to the out-of-source build directory (which previously was passed around as FIREBASE_INSTALL_DIR). This repurposes FIREBASE_INSTALL_DIR to point to ${FIREBASE_BINARY_DIR}/opt, and installation root for subprojects that have an install step. * Allow download directory to be specified
* Adjust serializer test to verify via libprotobuf. (#1039)Gravatar rsgowman2018-04-24
| | | | | | Previously, the tests would compare serialization results against a precomputed (via protoc) array of bytes. Now they serialize via our nanopb based class and deserialize via libprotobuf (and vice versa) and then ensure the result is the same as the input
* Add CMake options to build using sanitizers (#1053)Gravatar Konstantin Varlamov2018-04-12
| | | Example run: `cmake -DWITH_ASAN=ON ..` (from Firestore build folder)
* Only add nanopb proto headers to the -I path when depending on the nanopb ↵Gravatar rsgowman2018-03-27
| | | | | | protos. (#982) This is motivated by wanting to use libprotobuf in the project too, but it's also sensible by itself.
* Serialize and deserialize null (#783)Gravatar rsgowman2018-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | * Build (grpc's) nanopb with -DPB_FIELD_16BIT We require (at least) 16 bit fields. (By default, nanopb uses 8 bit fields, ie allowing up to 256 field tags.) Also note that this patch adds this to grpc's nanopb, rather than to our nanopb. We'll need to eventually either: a) we instruct grpc to use our nanopb b) we rely on grpc's nanopb instead of using our own. (^ marked as a TODO for now.) * Add some dependant protos Imported from protobuf. Nanopb requires these to be present (though anything using libprotobuf does not, as these are already built into that.) * Add generated nanopb protos based off of newly added proto definitions * Build the nanopb protos * Serialize and deserialize null
* Hook up nanopb to firestorep projectGravatar Rich Gowman2018-02-06
| | | | | Use remote/serializer placeholder class as a hook for the test to ensure nanopb headers can be found, and test can be linked.
* Add platform detection logic for SecureRandom (#676)Gravatar Gil2018-01-19
| | | | | | | | | | | | | | | * Add CMake platform detection logic for SecureRandom Now only builds secure_random_arc4random.cc if available. Remove firebase/firestore/base/port.h. Nothing else was in that directory. * Add a SecureRandom implementation that uses OpenSSL This is usable on Linux, Windows, and Android * Properly check return from RAND_bytes
* Simplify integration with googletest (#672)Gravatar Gil2018-01-17
| | | | This makes it possible to build the Firestore subproject with CLion because it no longer needs to be told where googletest is.
* Enable warnings in the CMake build (#669)Gravatar Gil2018-01-16
| | | | | | * Enable warnings when building with GCC or clang * Fix warnings
* Build gRPC for Firestore C++ (#652)Gravatar Gil2018-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Port StringPrintf from //base (#624)Gravatar Gil2018-01-08
| | | | | | | | | | | | | | | | | | | | | * Port StringPrintf from //base. Prefer this to approaches based on variadic templates. While the variadic template mechanisms are strictly safer, they result in binary bloat we can't afford. This is essentially the same StringPrintf previously open sourced as a part of protobuf, though updated for C++11 which saves a copy and a temporary buffer on the heap. * Add abseil as a subdirectory of Firestore This saves having to redefine all the libraries that abseil defines as imported libraries. * Rename firebase_firesture_util_log_* targets Cut the log out of the name to reflect that these will get more components besides just logging.
* Build and test both C++ loggers where possible (#595)Gravatar Gil2018-01-03
| | | | | | | | | | | | | | | | | | * 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.
* Build FirebaseCore from CMake (#594)Gravatar Gil2018-01-01
| | | | | | | | | | | | | | | | | | | | | | * Don't bother specifying a download directory to CMake ExternalProject * Teach CMake to build pure Xcode projects as dependencies This allows downstream code (like log_apple.mm) to consume this for testing within the CMake build without requiring a CMake-native build for these components. This makes integrating these components into the cmake build essentially free from the point of view of the consumed component. * Get the CMake build semi-working on Linux again Many prebuilt versions of cmake on Linux lack the ability to download over https so use git to get googletest. Don't attempt to build FirebaseCore on Linux; there's no xcodebuild. Note the build is still ultimately broken because we don't yet have an alternative to arc4random on Linux but at least this is no more broken than it was before.
* Add leveldb to the Firestore cmake build (#559)Gravatar Gil2017-12-12
| | | | | | | | | | | | * 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
* Rework the top-level cmake build to be a superproject (#538)Gravatar Gil2017-12-06
| | | | | All projects are now ExternalProjects This makes it much easier to build them all in a single pass.
* Move sources into firebase::firestore and internal namespaces (#494)Gravatar Gil2017-11-30
| | | | | | | * Move sources into firebase::firestore and internal namespaces Combine support and core/util packages; this distinction wasn't really paying its freight.
* Port autoid to C++ and remove FSTUtil (#475)Gravatar Gil2017-11-27
| | | | | | * Port autoid to C++ * Reimplement FSTUtil on top of firestore::CreateAutoId directly * Migrate FSTUtil callers to directly use firestore::CreateAutoId * Remove FSTUtil
* Add SecureRandom (#473)Gravatar Gil2017-11-20
| | | | * Add SecureRandom * Add CMake support for building src/support
* Initial CMake-based build (#472)Gravatar Gil2017-11-20
Initial CMake-based build This knows how to download and build googletest.