https://gitee.com/apache/thrift.git
依赖boost,设置Boost_INCLUDE_DIR路径,cmake_warn比较多(可以忽略)
set(Boost_INCLUDE_DIR D:\Opensource\boost_1_78_0)
include(BoostMacros)
build/cmake/thriftmarcos.cmake中修改,输出静态库lib
ADD_LIBRARY_THRIFT
add_library(${name} STATIC ${ARGN})
cmakelists.txt中添加add_definitions(“-DTHRIFT_STATIC_DEFINE”)
service CallService {string Process(1:string file,2:string value)
}
thrift编译idl文件,输出对应语言类型代码,输出到gen-cpp文件中
thrift --gen cpp a.thrift
thrift --gen java a.thrift //java
thrift --gen netstd a.thrift //c#<