Skip to content

Enable -Wcomma for our build; disable it for abseil. #799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 16, 2018
Merged
Show file tree
Hide file tree
Changes from all 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
17 changes: 15 additions & 2 deletions FirebaseFirestore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
'Firestore/core/include/**/*.{h,cc,mm}',
'Firestore/core/src/**/*.{h,cc,mm}',
'Firestore/third_party/Immutable/*.[mh]',
'Firestore/third_party/abseil-cpp/**/*.{h,cc}'
]
s.requires_arc = [
'Firestore/Source/**/*',
Expand All @@ -45,7 +44,6 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
s.exclude_files = [
'Firestore/Port/*test.cc',
'Firestore/third_party/Immutable/Tests/**',
'Firestore/third_party/abseil-cpp/**/*_test.{h,cc}',

# Exclude alternate implementations for other platforms
'Firestore/core/src/firebase/firestore/util/assert_stdio.cc',
Expand Down Expand Up @@ -79,4 +77,19 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
Firestore/core/src/firebase/firestore/util/config.h.in > \
Firestore/core/src/firebase/firestore/util/config.h
CMD

s.subspec 'abseil-cpp' do |ss|
ss.preserve_path = [
'Firestore/third_party/abseil-cpp/absl'
]
ss.source_files = [
'Firestore/third_party/abseil-cpp/**/*.cc'
]
ss.exclude_files = [
'Firestore/third_party/abseil-cpp/**/*_test.cc',
]

ss.library = 'c++'
ss.compiler_flags = '$(inherited) ' + '-Wno-comma'
end
end
3 changes: 3 additions & 0 deletions cmake/CompilerSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ if(CLANG OR GNU)
APPEND common_flags
-Wconditional-uninitialized -Werror=return-type -Winfinite-recursion -Wmove
-Wrange-loop-analysis -Wunreachable-code

# Options added to match apple recommended project settings
-Wcomma
)
endif()

Expand Down