summaryrefslogtreecommitdiff
path: root/test/cpp
diff options
context:
space:
mode:
authorzeshuai007 <51382517@qq.com>2020-04-09 11:17:05 +0800
committerJens Geyer <jensg@apache.org>2020-04-21 23:29:14 +0200
commit57c2507208aede3ec60c7bab50aaeb093fe44eca (patch)
treef12fc1b5109226b044ac88b39c4a227042fad6aa /test/cpp
parentdd7e11798ba524f7ae6204b68f073ee696deb595 (diff)
downloadthrift-57c2507208aede3ec60c7bab50aaeb093fe44eca.tar.gz
THRIFT-5168 Useless generated code when .thrift file only has service type
Client: cpp Patch: zeshuai007 <51382517@qq.com> This closes #2095
Diffstat (limited to 'test/cpp')
-rwxr-xr-xtest/cpp/CMakeLists.txt4
-rwxr-xr-xtest/cpp/Makefile.am7
2 files changed, 2 insertions, 9 deletions
diff --git a/test/cpp/CMakeLists.txt b/test/cpp/CMakeLists.txt
index 90af7826c..a136a4887 100755
--- a/test/cpp/CMakeLists.txt
+++ b/test/cpp/CMakeLists.txt
@@ -52,8 +52,6 @@ LINK_AGAINST_THRIFT_LIBRARY(crosstestgencpp thrift)
set(crossstressgencpp_SOURCES
gen-cpp/Service.cpp
- gen-cpp/StressTest_types.cpp
- gen-cpp/StressTest_constants.cpp
)
add_library(crossstressgencpp STATIC ${crossstressgencpp_SOURCES})
LINK_AGAINST_THRIFT_LIBRARY(crossstressgencpp thrift)
@@ -92,6 +90,6 @@ add_custom_command(OUTPUT gen-cpp/SecondService.cpp gen-cpp/SecondService.h gen-
COMMAND ${THRIFT_COMPILER} --gen cpp:templates,cob_style -r ${PROJECT_SOURCE_DIR}/test/ThriftTest.thrift
)
-add_custom_command(OUTPUT gen-cpp/StressTest_types.cpp gen-cpp/StressTest_constants.cpp gen-cpp/Service.cpp
+add_custom_command(OUTPUT gen-cpp/Service.cpp
COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/StressTest.thrift
)
diff --git a/test/cpp/Makefile.am b/test/cpp/Makefile.am
index 76ae82bfb..4f77c1501 100755
--- a/test/cpp/Makefile.am
+++ b/test/cpp/Makefile.am
@@ -22,8 +22,6 @@ BUILT_SOURCES = gen-cpp/ThriftTest.cpp \
gen-cpp/ThriftTest_types.cpp \
gen-cpp/ThriftTest_constants.cpp \
gen-cpp/SecondService.cpp \
- gen-cpp/StressTest_types.cpp \
- gen-cpp/StressTest_constants.cpp \
gen-cpp/Service.cpp
noinst_LTLIBRARIES = libtestgencpp.la libstresstestgencpp.la
@@ -44,9 +42,6 @@ nodist_libtestgencpp_la_SOURCES = \
libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
nodist_libstresstestgencpp_la_SOURCES = \
- gen-cpp/StressTest_constants.cpp \
- gen-cpp/StressTest_types.cpp \
- gen-cpp/StressTest_constants.h \
gen-cpp/StressTest_types.h \
gen-cpp/Service.cpp \
gen-cpp/Service.h
@@ -105,7 +100,7 @@ StressTestNonBlocking_LDADD = \
gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/SecondService.cpp gen-cpp/SecondService.h gen-cpp/SecondService.tcc: $(top_srcdir)/test/ThriftTest.thrift $(THRIFT)
$(THRIFT) --gen cpp:templates,cob_style -r $<
-gen-cpp/StressTest_types.cpp gen-cpp/StressTest_constants.cpp gen-cpp/Service.cpp: $(top_srcdir)/test/StressTest.thrift $(THRIFT)
+gen-cpp/Service.cpp: $(top_srcdir)/test/StressTest.thrift $(THRIFT)
$(THRIFT) --gen cpp $<
AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(LIBEVENT_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -Igen-cpp -I.