blob: 4ed14cc52ce922f9fca7a4628f32a7b8a1a71264 [file] [log] [blame]
Roger Meiera03464c2015-09-30 08:15:53 +02001macro(GENERATE FILENAME GENERATOR OUTPUTDIR)
Nobuaki Sukegawaa3b88a02016-01-06 20:44:17 +09002 file(MAKE_DIRECTORY ${MY_CURRENT_BINARY_DIR}/${OUTPUTDIR})
3 execute_process(COMMAND ${THRIFTCOMPILER} --gen ${GENERATOR} -out ${MY_CURRENT_BINARY_DIR}/${OUTPUTDIR} ${FILENAME}
Roger Meiera03464c2015-09-30 08:15:53 +02004 RESULT_VARIABLE CMD_RESULT)
5 if(CMD_RESULT)
6 message(FATAL_ERROR "Error generating ${FILENAME} with generator ${GENERATOR}")
7 endif()
8endmacro(GENERATE)
9
10generate(${MY_PROJECT_DIR}/test/ThriftTest.thrift py gen-py-default)
11generate(${MY_PROJECT_DIR}/test/ThriftTest.thrift py:slots gen-py-slots)
Nobuaki Sukegawaa3b88a02016-01-06 20:44:17 +090012generate(${MY_PROJECT_DIR}/test/ThriftTest.thrift py:old_style gen-py-oldstyle)
13generate(${MY_PROJECT_DIR}/test/ThriftTest.thrift py:no_utf8strings gen-py-no_utf8strings)
Roger Meiera03464c2015-09-30 08:15:53 +020014generate(${MY_PROJECT_DIR}/test/ThriftTest.thrift py:dynamic gen-py-dynamic)
15generate(${MY_PROJECT_DIR}/test/ThriftTest.thrift py:dynamic,slots gen-py-dynamicslots)
16
17generate(${MY_PROJECT_DIR}/test/DebugProtoTest.thrift py gen-py-default)
18generate(${MY_PROJECT_DIR}/test/DebugProtoTest.thrift py:slots gen-py-slots)
Nobuaki Sukegawaa3b88a02016-01-06 20:44:17 +090019generate(${MY_PROJECT_DIR}/test/DebugProtoTest.thrift py:old_style gen-py-oldstyle)
20generate(${MY_PROJECT_DIR}/test/DebugProtoTest.thrift py:no_utf8strings gen-py-no_utf8strings)
Roger Meiera03464c2015-09-30 08:15:53 +020021generate(${MY_PROJECT_DIR}/test/DebugProtoTest.thrift py:dynamic gen-py-dynamic)
22generate(${MY_PROJECT_DIR}/test/DebugProtoTest.thrift py:dynamic,slots gen-py-dynamicslots)
Eric Connerc34653f2017-06-21 03:34:12 +020023
Ozan Can Altioke46419b2018-03-20 15:02:28 +030024generate(${MY_PROJECT_DIR}/test/DoubleConstantsTest.thrift py gen-py-default)
25generate(${MY_PROJECT_DIR}/test/DoubleConstantsTest.thrift py:slots gen-py-slots)
26generate(${MY_PROJECT_DIR}/test/DoubleConstantsTest.thrift py:old_style gen-py-oldstyle)
27generate(${MY_PROJECT_DIR}/test/DoubleConstantsTest.thrift py:no_utf8strings gen-py-no_utf8strings)
28generate(${MY_PROJECT_DIR}/test/DoubleConstantsTest.thrift py:dynamic gen-py-dynamic)
29generate(${MY_PROJECT_DIR}/test/DoubleConstantsTest.thrift py:dynamic,slots gen-py-dynamicslots)
30
Eric Connerc34653f2017-06-21 03:34:12 +020031generate(${MY_PROJECT_DIR}/test/Recursive.thrift py gen-py-default)
32generate(${MY_PROJECT_DIR}/test/Recursive.thrift py:slots gen-py-slots)
33generate(${MY_PROJECT_DIR}/test/Recursive.thrift py:old_style gen-py-oldstyle)
34generate(${MY_PROJECT_DIR}/test/Recursive.thrift py:no_utf8strings gen-py-no_utf8strings)
35generate(${MY_PROJECT_DIR}/test/Recursive.thrift py:dynamic gen-py-dynamic)
36generate(${MY_PROJECT_DIR}/test/Recursive.thrift py:dynamic,slots gen-py-dynamicslots)