diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2015-11-23 12:04:47 -0500 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2015-11-23 12:04:47 -0500 |
commit | 4e3388168df413133e0e97791cc131f8131f478c (patch) | |
tree | ceee88f1006100cd327a271cc0bb047c352c11ec /conformance/Makefile.am | |
parent | 41824d93e5bde93afde4c2627e481d6e8f4f2b0c (diff) | |
parent | 1745f7eae9bc206ffeb47d63dcdfa039ef3774e8 (diff) | |
download | protobuf-4e3388168df413133e0e97791cc131f8131f478c.tar.gz protobuf-4e3388168df413133e0e97791cc131f8131f478c.tar.bz2 protobuf-4e3388168df413133e0e97791cc131f8131f478c.zip |
Merge pull request #980 from thomasvl/obj_conformance
Add support for the conformance test for objc when run on OS X
Diffstat (limited to 'conformance/Makefile.am')
-rw-r--r-- | conformance/Makefile.am | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/conformance/Makefile.am b/conformance/Makefile.am index b6fda2a8..d7bb9397 100644 --- a/conformance/Makefile.am +++ b/conformance/Makefile.am @@ -9,7 +9,9 @@ protoc_outputs = \ other_language_protoc_outputs = \ conformance.rb \ - com/google/protobuf/conformance/Conformance.java + com/google/protobuf/conformance/Conformance.java \ + Conformance.pbobjc.h \ + Conformance.pbobjc.m bin_PROGRAMS = conformance-test-runner conformance-cpp @@ -17,16 +19,37 @@ conformance_test_runner_LDADD = $(top_srcdir)/src/libprotobuf.la conformance_test_runner_SOURCES = conformance_test.cc conformance_test_runner.cc nodist_conformance_test_runner_SOURCES = conformance.pb.cc conformance_test_runner_CPPFLAGS = -I$(top_srcdir)/src +# Explicit deps beacuse BUILT_SOURCES are only done before a "make all/check" +# so a direct "make test_cpp" could fail if parallel enough. +conformance_test_runner-conformance_test.$(OBJEXT): conformance.pb.h +conformance_test_runner-conformance_test_runner.$(OBJEXT): conformance.pb.h conformance_cpp_LDADD = $(top_srcdir)/src/libprotobuf.la conformance_cpp_SOURCES = conformance_cpp.cc nodist_conformance_cpp_SOURCES = conformance.pb.cc conformance_cpp_CPPFLAGS = -I$(top_srcdir)/src +# Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check" +# so a direct "make test_cpp" could fail if parallel enough. +conformance_cpp-conformance_cpp.$(OBJEXT): conformance.pb.h + +if OBJC_CONFORMANCE_TEST + +bin_PROGRAMS += conformance-objc + +conformance_objc_SOURCES = conformance_objc.m ../objectivec/GPBProtocolBuffers.m +nodist_conformance_objc_SOURCES = Conformance.pbobjc.m +conformance_objc_CPPFLAGS = -I$(top_srcdir)/objectivec +conformance_objc_LDFLAGS = -framework Foundation +# Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check" +# so a direct "make test_objc" could fail if parallel enough. +conformance_objc-conformance_objc.$(OBJEXT): Conformance.pbobjc.h + +endif if USE_EXTERNAL_PROTOC protoc_middleman: $(protoc_inputs) - $(PROTOC) -I$(srcdir) --cpp_out=. --java_out=. --ruby_out=. $^ + $(PROTOC) -I$(srcdir) --cpp_out=. --java_out=. --ruby_out=. --objc_out=. $^ touch protoc_middleman else @@ -35,7 +58,7 @@ else # relative to srcdir, which may not be the same as the current directory when # building out-of-tree. protoc_middleman: $(top_srcdir)/src/protoc$(EXEEXT) $(protoc_inputs) - oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/../src/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd --java_out=$$oldpwd --ruby_out=$$oldpwd $(protoc_inputs) ) + oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/../src/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd --java_out=$$oldpwd --ruby_out=$$oldpwd --objc_out=$$oldpwd $(protoc_inputs) ) touch protoc_middleman endif @@ -44,7 +67,7 @@ $(protoc_outputs): protoc_middleman $(other_language_protoc_outputs): protoc_middleman -BUILT_SOURCES = $(protoc_outputs) +BUILT_SOURCES = $(protoc_outputs) $(other_language_protoc_outputs) CLEANFILES = $(protoc_outputs) protoc_middleman javac_middleman conformance-java conformance-csharp $(other_language_protoc_outputs) @@ -82,3 +105,10 @@ test_csharp: protoc_middleman conformance-test-runner conformance-csharp test_ruby: protoc_middleman conformance-test-runner $(other_language_protoc_outputs) RUBYLIB=../ruby/lib:. ./conformance-test-runner --failure_list failure_list_ruby.txt ./conformance_ruby.rb + +if OBJC_CONFORMANCE_TEST + +test_objc: protoc_middleman conformance-test-runner conformance-objc + ./conformance-test-runner --failure_list failure_list_objc.txt ./conformance-objc + +endif |