Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion firestore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,11 @@ add_custom_target(
# are guarded by this flag, such as GetUserAgent and function_registry.
set(FIREBASE_FIRESTORE_CPP_DEFINES -DINTERNAL_EXPERIMENTAL=1)

if (WIN32 AND NOT ANDROID AND NOT IOS)
if (MSVC AND NOT ANDROID AND NOT IOS)
# On Windows, gRPC gives a compiler error in firebase_metadata_provider_desktop.cc
# unless _WIN32_WINNT is defined to this value (0x0600, Windows Vista).
# Also set -DNOMINMAX for both Firestore and Firestore Core.
message("SET -DNOMINMAX for firestore cpp build")
set(FIREBASE_FIRESTORE_CPP_DEFINES ${FIREBASE_FIRESTORE_CPP_DEFINES} -D_WIN32_WINNT=0x0600 -DNOMINMAX)
# Special handling for the absl time zone library, define _LIBCPP_VERSION on
# Windows to avoid the shenanigans they do with Windows mangled symbols to
Expand All @@ -362,6 +363,7 @@ if (WIN32 AND NOT ANDROID AND NOT IOS)
_LIBCPP_VERSION=99)
endif()

message("FIREBASE_FIRESTORE_CPP_DEFINES is ${FIREBASE_FIRESTORE_CPP_DEFINES}")
target_compile_definitions(firebase_firestore
PRIVATE
${FIREBASE_FIRESTORE_CPP_DEFINES}
Expand Down
1 change: 1 addition & 0 deletions firestore/src/include/firebase/firestore/field_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ class FieldValue final {
static FieldValue Increment(T by_value) {
// Note: Doxygen will run into trouble if this function's definition is
// moved outside the class body.
#undef max
static_assert(
std::numeric_limits<T>::max() <= std::numeric_limits<double>::max(),
"The floating point type you provided is larger than can fit in a "
Expand Down