THRIFT-5168 Useless generated code when .thrift file only has service type
Client: cpp
Patch: zeshuai007 <51382517@qq.com>
This closes #2095
diff --git a/lib/cpp/test/CMakeLists.txt b/lib/cpp/test/CMakeLists.txt
index fba15f6..48e2fd3 100644
--- a/lib/cpp/test/CMakeLists.txt
+++ b/lib/cpp/test/CMakeLists.txt
@@ -42,7 +42,6 @@
gen-cpp/Recursive_types.h
gen-cpp/ThriftTest_types.cpp
gen-cpp/ThriftTest_types.h
- gen-cpp/OneWayTest_types.cpp
gen-cpp/OneWayTest_types.h
gen-cpp/OneWayService.cpp
gen-cpp/OneWayService.h
@@ -392,7 +391,7 @@
COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/ThriftTest.thrift
)
-add_custom_command(OUTPUT gen-cpp/OneWayService.cpp gen-cpp/OneWayTest_constants.cpp gen-cpp/OneWayTest_types.h gen-cpp/OneWayService.h gen-cpp/OneWayTest_constants.h gen-cpp/OneWayTest_types.cpp
+add_custom_command(OUTPUT gen-cpp/OneWayService.cpp gen-cpp/OneWayTest_types.h gen-cpp/OneWayService.h
COMMAND ${THRIFT_COMPILER} --gen cpp ${CMAKE_CURRENT_SOURCE_DIR}/OneWayTest.thrift
)