So the only decent example I've found for this is http://grokbase.com/t/thrift/user/1162hvgrdn/recommended-way-to-incorporate-thrift-to-the-build-system , however it seems to be quite buggy, for example the if statement is missing ${THRIFT_FILE} .
That said I'm getting caught up on execute prcoess command returning: "execute_process given uknown argument - "STUFF" where stuff is what looks tobe a proper thrift command.
Any suggestions and what's wrong here?
Better late then never. Use add_custom_command
add_custom_command(
OUTPUT
${GEN_FILES_PATH}/DebugProtoTest_types.cpp
${GEN_FILES_PATH}/DebugProtoTest_types.h
COMMAND
$<TARGET_FILE:compiler> --gen cpp:dense ${TEST_PATH}/DebugProtoTest.thrift
DEPENDS
compiler
WORKING_DIRECTORY
${CMAKE_BINARY_DIR}
)
I use it to generate test-related stuff for Apache thrift here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With