From 7a97f6c2abf39752bb66a520d57bc6e9c11b269d Mon Sep 17 00:00:00 2001 From: rsgowman Date: Fri, 16 Feb 2018 09:47:30 -0500 Subject: Enable -Wcomma for our build; disable it for abseil. (#799) In order to use different cflags for abseil, this patch splits it out into a subspec within the pod. The cmake side of things "just works" since Firestore/CMakeLists.txt includes abseil before setting our compiler flags. --- FirebaseFirestore.podspec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'FirebaseFirestore.podspec') diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec index 84a89d1..25b476a 100644 --- a/FirebaseFirestore.podspec +++ b/FirebaseFirestore.podspec @@ -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/**/*', @@ -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', @@ -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 -- cgit v1.2.3