diff options
author | zeshuai007 <51382517@qq.com> | 2020-04-09 11:17:05 +0800 |
---|---|---|
committer | Jens Geyer <jensg@apache.org> | 2020-04-21 23:29:14 +0200 |
commit | 57c2507208aede3ec60c7bab50aaeb093fe44eca (patch) | |
tree | f12fc1b5109226b044ac88b39c4a227042fad6aa /tutorial/cpp | |
parent | dd7e11798ba524f7ae6204b68f073ee696deb595 (diff) | |
download | thrift-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.txt | 3 | ||||
-rwxr-xr-x | tutorial/cpp/Makefile.am | 4 |
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 |