summaryrefslogtreecommitdiff
path: root/tutorial/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 /tutorial/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 'tutorial/cpp')
-rw-r--r--tutorial/cpp/CMakeLists.txt3
-rwxr-xr-xtutorial/cpp/Makefile.am4
2 files changed, 2 insertions, 5 deletions
diff --git a/tutorial/cpp/CMakeLists.txt b/tutorial/cpp/CMakeLists.txt
index c6d8fc320..b250a2c1c 100644
--- a/tutorial/cpp/CMakeLists.txt
+++ b/tutorial/cpp/CMakeLists.txt
@@ -30,7 +30,6 @@ include(ThriftMacros)
set(tutorialgencpp_SOURCES
gen-cpp/Calculator.cpp
gen-cpp/SharedService.cpp
- gen-cpp/shared_constants.cpp
gen-cpp/shared_types.cpp
gen-cpp/tutorial_constants.cpp
gen-cpp/tutorial_types.cpp
@@ -38,7 +37,7 @@ set(tutorialgencpp_SOURCES
add_library(tutorialgencpp STATIC ${tutorialgencpp_SOURCES})
LINK_AGAINST_THRIFT_LIBRARY(tutorialgencpp thrift)
-add_custom_command(OUTPUT gen-cpp/Calculator.cpp gen-cpp/SharedService.cpp gen-cpp/shared_constants.cpp gen-cpp/shared_types.cpp gen-cpp/tutorial_constants.cpp gen-cpp/tutorial_types.cpp
+add_custom_command(OUTPUT gen-cpp/Calculator.cpp gen-cpp/SharedService.cpp gen-cpp/shared_types.cpp gen-cpp/tutorial_constants.cpp gen-cpp/tutorial_types.cpp
COMMAND ${THRIFT_COMPILER} --gen cpp -r ${PROJECT_SOURCE_DIR}/tutorial/tutorial.thrift
)
diff --git a/tutorial/cpp/Makefile.am b/tutorial/cpp/Makefile.am
index 95497d5f3..77fd6d579 100755
--- a/tutorial/cpp/Makefile.am
+++ b/tutorial/cpp/Makefile.am
@@ -27,8 +27,6 @@ nodist_libtutorialgencpp_la_SOURCES = \
gen-cpp/Calculator.h \
gen-cpp/SharedService.cpp \
gen-cpp/SharedService.h \
- gen-cpp/shared_constants.cpp \
- gen-cpp/shared_constants.h \
gen-cpp/shared_types.cpp \
gen-cpp/shared_types.h \
gen-cpp/tutorial_constants.cpp \
@@ -61,7 +59,7 @@ TutorialClient_LDADD = \
#
# Common thrift code generation rules
#
-gen-cpp/Calculator.cpp gen-cpp/SharedService.cpp gen-cpp/shared_constants.cpp gen-cpp/shared_types.cpp gen-cpp/tutorial_constants.cpp gen-cpp/tutorial_types.cpp: $(top_srcdir)/tutorial/tutorial.thrift
+gen-cpp/Calculator.cpp gen-cpp/SharedService.cpp gen-cpp/shared_types.cpp gen-cpp/tutorial_constants.cpp gen-cpp/tutorial_types.cpp: $(top_srcdir)/tutorial/tutorial.thrift
$(THRIFT) --gen cpp -r $<
AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(LIBEVENT_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -Igen-cpp