Commit Graph
8 Commits
Author SHA1 Message Date
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 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
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
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
Marek Gilbert 0d7e2b8922 Rename CMake modules filenames to snake_case.
* SanitizerOptions to sanitizer_options
  * CompilerSetup to compiler_setup
2018-07-16 15:09:06 -07:00