Commit Graph
101 Commits
Author SHA1 Message Date
Paul Beusterien 83e898ab5c One Firebase version (#6634) 2020-10-02 12:26:22 -07:00
Gil 1fdb83e739 Remove old cc_rules cruft. (#6388)
This is left-over from the migration completed in #5323 (as part of
b/152883646).

Briefly, we used have much more complex self-contained rules that tried
to manage sources, dependencies, and everything in a single rule like
firebase_ios_cc_library. The migration added functions like
firebase_ios_add_library that more closely matched builtin CMake
primitives. I should have sent this PR as the final one in that
sequence.
2020-09-01 18:01:39 -07:00
Gil 9f7301aca6 Remove -fmodules from C++ compilation flags. (#6385)
This option doesn't work with C++, and even though the clang compiler
ignores it, clangd does not, and this causes syntax highlighting
failures in CLion.
2020-09-01 17:59:58 -07:00
f33276f530 Update nanopb py3 0.3.9.5 -> 0.3.9.6 (#6214)
* update nanopb from 0.3.9.5 to 0.3.9.6

This fixes issues building firestore SDK with Python3.
Interestingly, latest version 0.4.2 still errors during the build
but 0.3.9.6 works. The git commit for this fix in nanopb
https://github.com/nanopb/nanopb/commit/63f8e5e4946a5f8f0211b454bd37187871c3d023

* Update generated sources

* updating just nanopb dependency version

nanopb updated from 0.3.9.5 to 0.3.9.6
(pod version 1.30905.0 to 1.30906.0)

* Add missing source specifier

* Generated files for protos using nanopb 0.3.9.6

* removed unnecessary whitespaces in files generated by protoc

* using more qualified relative paths for header includes

* Changelog

Co-authored-by: Marek Gilbert <mcg@google.com>
Co-authored-by: Paul Beusterien <paulbeusterien@google.com>
2020-08-14 14:13:01 -07:00
Paul Beusterien 3d573f9714 Update Firestore sources for nanopb 0.3.9.5 (#5481) 2020-04-27 17:07:11 -07:00
Gil 1df5574c4f Upgrade gRPC-C++ to 1.28.0 (#4312)
This unblocks nanopb changes proposed in #4264.

This upgrades everything in the gRPC constellation of dependencies to match gRPC at 1.28:

  * gRPC to 1.28.0 (note that gRPC 1.28.1, while released, is a fix for just the python binding and there's no gRPC-C++ CocoaPod at that version)
  * Abseil to 20200225 (as of gRPC 1.27 this is now a gRPC dependency too; there's a later patch but gRPC doesn't use it yet)
  * Protobuf C++ to 3.11.4 (only used for testing in Firestore)
  * C-Ares to 1.15.0
  * BoringSSL to match (no change between gRPC 1.27.0 and 1.28.0)

Also, this disables CFStream-based transport on Apple platforms. This works around b/133182964, wherein CFStream will occasionally fail to raise a has-bytes-available events, causing Firestore to appear to hang.
2020-04-22 14:03:34 -07:00
Gil 314f137bd5 Shorten CMake Objective-C targets (#5323)
* Shorten firebase_firestore_example_app

... and:
  * Migrate to firebase_ios_add_executable
  * Use globs for specifying sources

* Migrate Example/Tests/API to new CMake primitives

* Migrate Example/Tests/Integration to new CMake primitives

* Migrate Example/Tests/SpecTests to new CMake primitives

* Migrate Example/Tests/Util to new CMake primitives

Rename firebase_firestore_objc_test_util to firestore_objc_testing.

* Migrate fuzzing to new CMake primitives

Rewrite firebase_ios_cc_fuzz_test to match the other primitives.

* Add firebase_ios_add_objc_test

* Migrate Example/Benchmarks to new CMake primitives
2020-04-20 10:28:36 -07:00
Gil c873af8038 Shorten CMake test targets/begin firebase_core consolidation (#5321)
* Add new, simpler CMake helper functions

... making them more like built-in functions. This makes it possible to
combine other CMake functions in ways that weren't possible with the
original all-in-one approach.

This includes:
  * firebase_ios_add_executable
  * firebase_ios_add_test
  * firebase_ios_add_library

All of which can be combined with target_link_libraries, etc.

* Shorten CMake test targets, e.g. firebase_firestore_util_test => firestore_util_test

* Remove CMake file inclusion check

Now that we're committed to using globs for finding sources, this check
is incompatible and no longer useful.
2020-04-15 11:02:56 -07:00
Gil 77f92cd2c6 Stop using built-in CMake Framework support (#5316)
* Fix previously unknown warnings

These become visible once flags are handled uniformly across all
Firestore targets in an upcoming build change.

* Stop using built-in CMake Framework support

CMake has built-in support for building Framework bundles (briefly:
bundles of libraries, associated headers, and resources) but this
doesn't work well for our needs.

1. In CMake 3.5.1 (our earliest supported CMake version) it doesn't copy
headers properly at build time.

2. Even up to CMake 3.15.5, CMake doesn't handle link-line multiplicity
correctly. CMake passes the static library location within the framework
and this seems to cause the linker to mishandle Objective-C metaclass
information resulting in duplicate symbols. Building with `-framework`
flags works correctly.

Previously we partially worked around the latter problem by building
some frameworks as shared instead of static frameworks, but this is
problematic because this mode of operation isn't actually intended and
is unsupported as far as the rest of Firebase is concerned. This turned
out to be fragile though and while refactoring libraries this workaround
broke.

Rather than piling on additional workarounds, this change converts the
frameworks to simple library targets and emulates framework imports
through include paths.

Additionally, this starts refactoring our cmake helper functions to make
them more like built-in functions. This makes it possible to freely use
different CMake features that were made difficult by trying to wrap
everything up in a single CMake command.

* style.sh generated changes

* Review feedback

* More review feedback
2020-04-14 08:40:33 -07:00
Gil a568a96f7e Add iOS build support to the CMake build (#5052)
* Use early exit in objc_framework CMakeLists.txt

* Clean up objc_framework CMakeLists.txt

  * Use `version` consistently
  * Use `firebase_ios_version` for the repo-level version
  * Remove INCLUDE directories that are no longer needed
  * Sort dependencies

* Simplify Example/App/CMakeLists.txt

  * Add `OBJC_FLAGS` directly, avoiding a separate `sources` variable.
  * Add resources directly

* Rename test host app to firebase_firestore_example_app

* Add a firebase_ios prefix to functions and variables

This reduces the chance of collision with other projects.

* Simplify compiler_setup

Now that compiler_setup.cmake no longer has side-effects, fold
compiler_id.cmake and archive_options.cmake into it and move
the include of compiler_setup up to the top of the main build.

* Add support for building for iOS

* Make building benchmarks optional

* Disable protoc-based source generators when cross-compiling

* Make downloading googletest optional

* Add DISABLE_STRICT_WARNINGS mode to cc_rules

This makes it possible to build non-Firestore components in the CMake
build to a lower standard than that to which we hold ourselves without
sacrificing the utility of the various build rules that we have.
2020-03-13 08:22:11 -07:00
Gil e404054a9f Refactor and clean up the CMake build ahead of CMake/iOS support (#5051)
* Use early exit in objc_framework CMakeLists.txt

* Clean up objc_framework CMakeLists.txt

  * Use `version` consistently
  * Use `firebase_ios_version` for the repo-level version
  * Remove INCLUDE directories that are no longer needed
  * Sort dependencies

* Simplify Example/App/CMakeLists.txt

  * Add `OBJC_FLAGS` directly, avoiding a separate `sources` variable.
  * Add resources directly

* Rename test host app to firebase_firestore_example_app

* Add a firebase_ios prefix to functions and variables

This reduces the chance of collision with other projects.

* Simplify compiler_setup

Now that compiler_setup.cmake no longer has side-effects, fold
compiler_id.cmake and archive_options.cmake into it and move
the include of compiler_setup up to the top of the main build.
2020-03-10 20:50:13 -07:00
Gil d4e86ba091 Fixes for compatibility with builds in firebase-cpp-sdk (#4984)
* Don't modify CMAKE_CXX_FLAGS

* Avoid conflict on RANDOM_FILE

* Only conditionally build tests

* Remove alias provided by the upstream build

* Set SOURCE_DIR and BINARY_DIR for each external library

* Compute repo root without git

This supports building Firestore from a source archive

* Make empty files C++

This makes it possible to compile with a single set of flags for every
cc_library.
2020-02-26 17:54:13 -08:00
Gil 968da25ca8 Fix the Linux build under GCC 7.4.0 (#4761)
* Don't bother searching for XCTest on non-Apple platforms

* Force working directory to be in the project root

This makes the spec tests work when cmake is invoked with a relative filename.

* Fix build error on Linux/GCC 7.4.0
2020-01-29 10:23:42 -08:00
Gil 71b09774d3 Fix TSAN test failures under CMake (#4396) 2019-11-26 15:43:42 -08:00
wu-hui 2a8d069b77 Run integration tests from CMake on mac (#4276) 2019-11-19 13:40:43 -05:00
Gil 12fb9f61d2 Upgrade gRPC to 1.24.3; upgrade protobuf to 3.9.2 (#4252)
* Upgrade gRPC to 1.24.3

* Upgrade C++ Protobuf to 3.9.2

Disable -Wunreachable-code in protobuf-generated code

* Regenerate C++ protos with protobuf 3.9.2

* Generate objc protos with Protobuf 3.9.2
2019-11-07 15:23:14 -08:00
Gil 6317c62710 Upgrade GoogleTest to 1.10.0 (#4250) 2019-11-07 12:01:15 -08:00
Gil 79f45ee5c5 Make the CMake build warning free (#4251)
* Silence "file has no symbols" warnings from ranlib

* Silence warnings in Abseil's time zone library
2019-11-06 19:59:10 -08:00
Gil f89f624aed Require CMake 3.5.1; upgrade Google Benchmark to 1.5.0 (#4249)
* Require CMake 3.5.1

This is the version required by the latest versions of gRPC and Google
Benchmark. See discussion https://github.com/google/benchmark/pull/613.

Remove version check around find_package(XCTest)

Also, add a dependency on objc protos that was missing but somehow
implicitly being added before.

* Upgrade Google Benchmark to 1.5.0
2019-11-06 19:43:01 -08:00
Gil 1953cc59a4 Integrate with Abseil via CocoaPods (#4097)
Use Abseil 0.20190808
2019-11-05 09:12:34 -08:00
Konstantin Varlamov dbca369b0e Fix CMake build with Clang 10 (#3972)
The as-of-yet-unreleased Clang 10 adds some new warnings which make the CMake build fail (due to `-Werror`):
* BoringSSL build now fails because some of its C code contains fallthroughs in switch statements that aren't properly annotated. This wasn't an issue before because previous versions of Clang ignored `-Wimplicit-fallthrough` in C mode;
* serializer test contains an expression that produces the following warning:
```
/src/firebase-ios-sdk/Firestore/core/test/firebase/firestore/remote/serializer_test.cc:446:29:
error: implicit conversion from 'std::__1::numeric_limits<long>::type' (aka 'long') to 'double'
changes value from 9223372036854775807 to 9223372036854775808 [-Werror,
-Wimplicit-int-float-conversion]
```

Fixes:
* upgrade the version of BoringSSL used to the latest master. There's no particular reason to choose this commit, other than it happens to be the latest. The actual fixes we need are [this](https://github.com/google/boringssl/commit/05cd93068b0a553afc48f69acbceae10c6a17593) and [this](https://github.com/google/boringssl/commit/fbebe833b180a1a0685803c59bba38916826dd2b);
* apply `static_cast` to the serializer test. Also, because the cast produces a different value, add a couple of additional values to test.

The breakage was discovered thanks to the fuzz build (which already uses Clang 10 from trunk).
2019-10-01 20:48:56 -04:00
Gil 75a8356c98 Upgrade GoogleTest to 1.8.1 (#3898)
This gives access to testing::ScopedTrace, which was previously
internal.
2019-09-26 11:41:47 -07:00
Gil 266a025421 Enable LevelDB on Windows under CMake (#3503)
* Update leveldb to 1.22

This adds Windows support (which was added to LevelDB in 1.21).

* Make use of LevelDB unconditional
2019-08-07 17:19:11 -07:00
Gil 49387ec9c5 Fix build under Linux/GCC Windows/MSVC (#3502)
* Avoid unconditionally setting C++ flags

These were already handled via CMAKE_C_FLAGS and CMAKE_CXX_FLAGS and
this breaks when compiling plain C under GCC, which considers unknown
options an error when compiling with -Werror.

* Fix compilation in Linux/GCC and also Windows/MSVC

GCC and MSVC aren't happy about `using Query = testutil::Query;` when
there's already `class Query` in scope.

* Fix objc_class.h in Windows

* Fix warnings that have crept in on Windows
2019-08-05 20:31:01 -07:00
Gil 766e8723d7 Rework CMake builds of Firebase Frameworks (#3499)
* Add sed scripts that find the versions of podspecs

... without fully loading those via Pod::Spec, which is slow.

* Avoid compiling with different visibility settings

... in different translation units. This removes warnings about linking
googletest causing weak symbols becoming strong.

* Add CMake objc_framework

* Define FirebaseCore via objc_framework

* Define FIRCoreDiagnosticsInterop via objc_framework

* Define GoogleUtilities with objc_framework

* Define FirebaseCoreDiagnosticsInterop via objc_framework

* Define FirebaseAuthInterop via objc_framework

* Don't duplicate Core's dependency information everywhere

* Remove podspec_framework

* Fix compilation error with -Wstrict-prototyes
2019-08-05 16:46:28 -07:00
Gil ec11035d1c Work around duplicate nanopb symbols in gRPC build (#3269)
gRPC packages 0.3.7-dev from 2016 in its own third_party directory and
builds it into libraries produced by CMake. Firestore depends on 0.3.9.2
via external dependency.

Firestore checks in its nanopb-generated sources for compatibility with
CocoaPods, where running the generator at build time on remote users'
machines is perilous. This means that Firestore's generated code must
match the version of nanopb available in CocoaPods.

Unfortunately, generated code from 0.3.7-dev and 0.3.9.2 are not
compatible with each other so we can't just downgrade the Firestore
CMake build to match gRPC and use its copy.

This change excludes gRPC's copy of nanopb until we get this fixed
upstream.
2019-06-26 20:05:56 -07:00
Gil afc71a4e84 CMake fixes for GoogleDataTransport (#3268)
* Fix a few things that should have been splatted but weren't

* Define PODS_TARGET_SRCROOT in CMake for compatibility with CocoaPods

* Compile pods we depend upon with looser settings

* Rename the nanopb dependency to match what CMake actually has

* Make #include <nanopb/pb.h> work

Remove the old way of #include <pb.h> once we change the Firestore
nanopb generator to match.
2019-06-26 17:30:44 -07:00
Gil 9892903266 Prep for FIRTimestampValue migration to C++ (#3155)
* Clean up GeoPoint port to C++

... based on things learned porting Timestamps.

There's no good way to include conversions equivalent to toGeoPoint in
FIRTimestamp, so pull out separate conversion functions that match other
similar things.

* Extract MakeTimePoint into time_testing.h

... for reuse elsewhere

* Add TimestampInternal Hash/Truncate

* Use a method similar to NSDate to get current time on apple platforms
2019-06-11 09:03:01 -07:00
Gil e2630d5b38 Fix builds with GCC/Linux (#3141)
* Remove _Nullable in plain C++
  * Avoid adding -framework Foundation multiplatform targets on
    non-Apple platforms
  * Fix ordered_code_benchmark to be in a .cc file
2019-06-05 07:19:43 -07:00
Gil 53d3ca199a CMake: Upgrade nanopb to 0.3.9.2 (#2985)
* Update nanopb to 0.3.9.2

This matches google3, even though 0.3.9.3 is out

* Regenerate protos with nanopb 0.3.9.2
2019-05-13 08:24:54 -07:00
Gil eb6ee49b54 CMake fixes (#2966)
* cc_binaries should not be tests

This will keep more involved benchmarks from extending test time
unreasonably.

* Fix target_link_libraries conformance with CMP0023

Avoid mixing keyword and non-keyword forms of target_link_libraries.

* Set target_include_directories to PRIVATE for cc_binary and cc_test

* Set add_sources to private

Fixes a warning about policy CMP0076, which wants to make sources
relative if they're public.

* Enable @rpath by default

This silences warnings about policy CMP0042, which we don't care much
about since we don't have install targets.

* Disable griping about undeclared byproducts

... when using the Ninja generator. In our case the undeclared outputs
come from dependencies and we'd need to fix them before we can adopt the
new policy here.
2019-05-08 09:09:04 -07:00
Gil 9f93a53347 When expanding all subspecs, exclude test specs (#2949)
Fixes CMake build broken by #2943.
2019-05-06 17:58:21 -07:00
Gil ff8032ada0 Move the util::objc namespace to just objc (#2865)
* Move the util::objc namespace to just objc

This removes all the namespace objc = firebase::firestore::util::objc
gunk to make it seem as if this was really the arrangement.

This is motivated by wanting to put additional things in this namespace
and use them in headers without having to use util::objc::Foo

* Add CMake support for header-only cc_library targets

* Have the linter allow #include <objc/objc.h>, a C header
2019-04-19 10:02:21 -07:00
Gil e4dcc96e52 Eliminate Objective-C BOOL in Firestore/core (#2574)
* Add objc::EqualTo and objc::Hash

These make it possible to use std::unordered_map with Objective-C object
keys.

* Use std::unordered_map in MemoryQueryCache

* Fix objective-C library detection

This ensures that .mm files are compiled with -fobjc-arc (among other
things).

* Remove BOOL in FSTDocument to eliminate static_cast<bool>
2019-03-18 17:28:46 -07:00
Konstantin Varlamov 8b1efabd82 gRPC: replace Objective-C implementation with the new C++ implementation (#2068)
* Revert "Revert "gRPC: replace Objective-C implementation with the new C++ implementation (#1968)" (#2030)"

This reverts commit ea567dca47.

* gRPC: fix bugs found during testing (#2039)

All in `GrpcStream`:
* make sure there are no pending completions when "finish" operation is enqueued;
* always finish gRPC calls;
* when connectivity changes, reset not just the calls, but the underlying channel as well.

* Revert "Partially revert "Update CHANGELOG for Firestore v0.14.0 (#2025)" (#2031)"

This reverts commit b2437b80f6.

* Update changelog for v0.15.0.

* gRPC: add gRPC wrapper classes to CMake build (#2015)

* add a C++ equivalent of `FIRFirestoreVersionString`. This eliminates the only Objective-C dependency of `grpc_connection.mm` and allows making it a pure C++ file;
* open-source `binary_to_array.py` script and use it in the build to embed `roots.pem` certificate file from gRPC into the Firestore binary. The embedded char array is then used to load certificate at runtime.

* Revert local change -- do not enable sanitizers by default
2018-11-13 11:51:06 -08:00
rsgowman ae6c85759d Move -Wreorder to cxxflag (instead of common, which impacts cflags) (#1881)
-Wreorder is not a valid cflag on at least linux/gcc.
2018-09-26 23:00:04 -04:00
Greg Soltis b11aab6441 Enforce field initialization order (#1873)
Add -Wreorder flag, make it an error, and fix the errors

This is enforced via CI in some cases, so make it enforced in all of Firestore.
2018-09-26 10:45:57 -07:00
Konstantin Varlamov 4fdd8e6d6c C++: slightly refactor Datastore and GrpcConnection (#1817)
Several minor changes related to `Datastore`:
* `WatchStream` and `WriteStream` now use `GrpcConnection` instead of `Datastore` to create the underlying `GrpcStream`. This is in line with consolidating management of gRPC objects into `GrpcConnection` and removes dependence of streams on `Datastore`;
* Add `CreateWatchStream`/`CreateWriteStream` functions to `Datastore`;
* For functions creating gRPC wrappers (`GrpcStream`), pass token as `auth::Token` instead of `string_view`. This prevents confusing the argument order between the token and the RPC name, and allows moving the logic for retrieving a token for an unauthenticated user into `GrpcConnection`.
* Most significantly, move conversion from `grpc::Status` to `util::Status` from `Datastore` into the `util::Status` class itself. The main motivation is to avoid any dependence of `GrpcStream`, a pure C++ class, on `Datastore`, an Objective-C++ class. The downside is diverging from `FSTDatastore`. I think it's fine, because a) other platforms don't have an equivalent of `Datastore::ConvertStatus`; b) this is in line with how Windows/Apple Foundation/POSIX errors are handled by `util::Status` already;
* in CMake build, bump the used version of gRPC to 1.14.2. This is to be able to include gRPC headers using `grpcpp` path, not deprecated `grpc++`.
2018-09-19 22:19:15 -04:00
rsgowman bb045a5b90 Create process to build proto sources (#1704)
* Rename nanopb/.../*.pb.c to nanopb/.../*.nanopb.c

This ensures that all generated nanopb files use the same (sub)
extension of nanopb. This matches up with nanopb's --extension
parameter (which will be enabled later in this PR.)

* Remove references to NANOPB_PROTOC_BIN

Which wasn't being used, and wasn't pointing to a valid protoc.

* Add ability to generate protos from cmake build.

Currently, it's an entirely manual process via 'generate_protos' target.
This target is not automatically run during a build.

See Firestore/Protos/build-protos.sh for expected usage.

* cleanup/update license in build-protos.sh

* Build grpc proto sources (objc only)

* Use 32bit nanopb fields (instead of 16)

To match xcode build, but also to allow google/api/annotations.proto to
compile. (A recent change to nanopb now enforces this.) This isn't
strictly necessary, since we don't make use of that proto, so we
could've simply removed it instead (and in fact, the objc protos do
exactly that) but matching the xcode build certainly seems worthwhile.

* Rebuild all proto sources

* Skip whitespace checks on protoc generated files
2018-09-04 12:26:28 -04:00
Gil 5a707ab44e Update CMake build instructions (#1730)
* Use bundler only when .bundle exists

This makes the build compatible with Travis which needs bundler and
local installs of cocoapods.

* Update gitignore

* Update CMake instructions
2018-08-23 09:14:14 -07:00
Gil 7bdcd93dfb Fix benchmark builds on non-Apple platforms (#1677) 2018-08-13 12:57:23 -07:00
Gil b5c4e0706c Add Google Benchmark to the CMake build (#1670) 2018-08-13 07:13:26 -07:00
Gil 162a14d9b6 Add a cc_binary CMake rule (#1671) 2018-08-09 18:22:47 -07:00
Mina Farid 67fce1d276 Add cc_fuzz_test build rule (#1655)
* Created `cc_fuzz_test` build rule that automatically:
  - Searches for `Fuzzer` package (libFuzzer or whatever is provided by
    OSS Fuzz).
  - Adds dependency of `Fuzzer`.
  - Copies the dictionary file and corpus directory to the target binary
    destination directory with the appropriate name.
* Modified fuzzing targets to use `cc_fuzz_test` rule.
2018-08-08 15:07:20 -04:00
Mina Farid af0e5fca4c OSS Fuzz CMake changes (#1611)
* Detect OSS Fuzz thorough `LIB_FUZZING_ENGINE` env var.
* Avoid building libFuzzer if not fuzzing.
* Load the fuzzing library either from the library provided by OSS Fuzz or from libFuzzer.a that was manually built from sources.
2018-08-01 16:30:15 -04:00
Gil ca7f161fb8 Simplify/normlaize CMake platform libraries (#1605)
* Remove no-longer relevant comment

Nanopb headers now have distinct names so search order no longer
matters.

* cc_* rules now automatically filter out objc sources

* Combine executor and async queue into a single library

* Add cc_select

Adds a mechanism similar to blaze/bazel's select() for choosing an
implementation of a library.

This also makes the platform-neutral generic name for the library a
proper CMake library, which removes the need to keep libraries in
dependency order within CMakeLists.txt.

* Alphabetize rules
2018-07-31 17:14:32 -07:00
Mina Farid 8766e5dda7 Fuzz Testing Firestore using CMake (#1593)
* Added `cc_binary` rule to allow executables.
* Added `libFuzzer` as an external project that Firestore depends on.
  * LibFuzzer is checked out from its SVN repository.
  * LibFuzzer is built using its `build.sh` script to produce the library `libFuzzer.a`.
  * Added a `FindLibFuzzer.cmake` script that looks for `libFuzzer.a`.
* Added a new cmake option `FUZZING` to enable fuzzing and adding the appropriate compiler flags.
  * Added `fuzzing_options.cmake` rules to check for compiler type and add the fuzzing flags accordingly.
* Added a `firebase_firestore_fuzzing_serializer` target that depends on `libFuzzer` and `firebase_firestore_remote` to fuzz test the serializer.
2018-07-30 15:53:42 -04:00
Gil 6aaf6e6fd0 Add initial support for non-UTF-8 compilation and filenames (#1599)
* Add UTF-8 to wide character conversions for Windows pathnames.

* Explicitly mark UTF-8 string literals

Without this, string literals are encoded in the host's encoding, which
can be anything including CP-1252 on Windows, which will generate
invalid UTF-8 data when fed through our serializer.
2018-07-28 10:13:48 -07:00
Gil 1be2405ee9 Add CMake support for building under Visual Studio 2017 (#1588)
* Add compiler flags for MSVC on VS2017

* Force gtest to use the dynamic runtime on Windows.

* Avoid setting flags that MSVC does not understand

* Add compiler_id: cheap shortcuts for conditional features on a compiler

* Fix googletest build under VS2017

* Force disable Abseil's tests, which don't compile under VS2017.

* Make Firestore CMake a self-contained build

Now shell out to a sub-CMake to prepare depenencies without needing an
explciit superbuild structure. This makes the Visual Studio and CLion
projects driven from the CMake configuration actually usable.

* Make LevelDB an optional dependency.

* Move third-party dependencies to the top-level
2018-07-26 18:09:53 -07:00
Gil 579f76ce43 Make Firestore CMake a self-contained build (#1587)
* Make Firestore CMake a self-contained build

Now shell out to a sub-CMake to prepare depenencies without needing an
explciit superbuild structure. This makes the Visual Studio and CLion
projects driven from the CMake configuration actually usable.

* Move third-party dependencies to the top-level
2018-07-26 09:44:03 -07:00