def scons_env(env, add=''):
opath = path.dirname(path.abspath('$TARGET'))
- lstr = 'thrift --cpp -o ' + opath + ' ' + add + ' $SOURCE'
+ lstr = 'thrift --gen cpp -o ' + opath + ' ' + add + ' $SOURCE'
cppbuild = Builder(action = lstr)
env.Append(BUILDERS = {'ThriftCpp' : cppbuild})
/*
-../compiler/cpp/thrift -cpp -dense DebugProtoTest.thrift
-../compiler/cpp/thrift -cpp -dense DenseLinkingTest.thrift
+../compiler/cpp/thrift -gen cpp:dense DebugProtoTest.thrift
+../compiler/cpp/thrift -gen cpp:dense DenseLinkingTest.thrift
g++ -Wall -g -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \
DebugProtoTest.cpp gen-cpp/DebugProtoTest_types.cpp \
gen-cpp/DenseLinkingTest_types.cpp \
/*
-../compiler/cpp/thrift -cpp -dense DebugProtoTest.thrift
-../compiler/cpp/thrift -cpp -dense OptionalRequiredTest.thrift
+../compiler/cpp/thrift --gen cpp:dense DebugProtoTest.thrift
+../compiler/cpp/thrift --gen cpp:dense OptionalRequiredTest.thrift
g++ -Wall -g -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \
gen-cpp/OptionalRequiredTest_types.cpp \
gen-cpp/DebugProtoTest_types.cpp \
/*
rm -rf gen-* orig-*
mkdir old new
-thrift -cpp -java -php -phpi -py -rb -xsd -perl -ocaml -erl -hs -strict ManyTypedefs.thrift
+thrift --gen cpp --gen java --gen php --gen phpi --gen py --gen rb --gen xsd --gen perl --gen ocaml --gen erl --gen hs --strict ManyTypedefs.thrift
mv gen-* old
-../compiler/cpp/thrift -cpp -java -php -phpi -py -rb -xsd -perl -ocaml -erl -hs -strict ManyTypedefs.thrift
+../compiler/cpp/thrift --gen cpp --gen java --gen php --gen phpi --gen py --gen rb --gen xsd --gen perl --gen ocaml --gen erl --gen hs --strict ManyTypedefs.thrift
mv gen-* new
diff -ur old new
rm -rf old new
/*
-thrift -cpp DebugProtoTest.thrift
+thrift --gen cpp DebugProtoTest.thrift
g++ -Wall -g -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \
ZlibTest.cpp \
../lib/cpp/.libs/libthriftz.a ../lib/cpp/.libs/libthrift.a \
debug: stress-test-debug stress-test-debug-nb
stubs: ../StressTest.thrift
- $(THRIFT) --cpp --php ../StressTest.thrift
+ $(THRIFT) --gen cpp --gen php ../StressTest.thrift
stress-test-debug-nb: stubs
g++ -o stress-test-nb $(DCFL) src/nb-main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
debug: server-debug client-debug
stubs: ../ThriftTest.thrift
- $(THRIFT) --cpp ../ThriftTest.thrift
+ $(THRIFT) --gen cpp ../ThriftTest.thrift
server-debug: stubs
g++ -o TestServer $(DCFL) src/TestServer.cpp ./gen-cpp/ThriftTest.cpp ./gen-cpp/ThriftTest_types.cpp
g++ -o TestClient $(CFL) src/TestClient.cpp ./gen-cpp/ThriftTest.cpp ./gen-cpp/ThriftTest_types.cpp
small:
- $(THRIFT) -cpp ../SmallTest.thrift
+ $(THRIFT) --gen cpp ../SmallTest.thrift
g++ -c $(CCFL) ./gen-cpp/SmallService.cpp ./gen-cpp/SmallTest_types.cpp
clean:
${GENDIR}/: ${RPCFILE}
rm -rf ${GENDIR}
- ${THRIFT} -erl ${TEST_RPCFILE}
- ${THRIFT} -erl ${STRESS_RPCFILE}
+ ${THRIFT} --gen erl ${TEST_RPCFILE}
+ ${THRIFT} --gen erl ${STRESS_RPCFILE}
mkdir -p ${GEN_INCLUDEDIR}
mkdir -p ${GEN_SRCDIR}
mkdir -p ${GEN_TARGETDIR}
inline: stubs-inline
stubs: ../ThriftTest.thrift
- $(THRIFT) --phpl ../ThriftTest.thrift
+ $(THRIFT) --gen php ../ThriftTest.thrift
stubs-inline: ../ThriftTest.thrift
- $(THRIFT) --phpi ../ThriftTest.thrift
+ $(THRIFT) --gen php:inlined ../ThriftTest.thrift
clean:
$(RM) -r gen-php gen-phpi
-#!/usr/local/bin/thrift -cpp -php -perl
-
service ThreadsTest {
i32 threadOne(1: i32 sleep=15),
i32 threadTwo(2: i32 sleep=15),
-#!/usr/local/bin/thrift --gen cpp --gen java --gen py --php --xsd --perl
-
/**
* This Thrift file can be included by other Thrift files that want to share
* these definitions.
-#!/usr/local/bin/thrift --gen cpp --gen java --gen py --php --gen rb --gen perl --erl --xsd -r
-#
# Thrift Tutorial
# Mark Slee (mcslee@facebook.com)
#