|
|
|
@ -147,6 +147,21 @@ if(LUA_FOUND) |
|
|
|
|
genfiles2 ALL |
|
|
|
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/upb/pb/compile_decoder_x64.h |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
add_test( |
|
|
|
|
NAME testlua |
|
|
|
|
COMMAND lua ${CMAKE_SOURCE_DIR}/tests/bindings/lua/test_upb.lua |
|
|
|
|
${CMAKE_SOURCE_DIR}/tests/bindings/lua/test_upb.pb.lua |
|
|
|
|
) |
|
|
|
|
set_property(TEST testlua PROPERTY ENVIRONMENT |
|
|
|
|
LUA_PATH=${CMAKE_SOURCE_DIR}/third_party/lunit/?.lua$<SEMICOLON>${CMAKE_SOURCE_DIR}/upb/bindings/lua/?.lua |
|
|
|
|
LUA_CPATH=${CMAKE_BINARY_DIR}/upb/bindings/lua/?.so |
|
|
|
|
) |
|
|
|
|
set_tests_properties(testlua |
|
|
|
|
PROPERTIES |
|
|
|
|
DEPENDS "upb_c;pb_c" |
|
|
|
|
) |
|
|
|
|
enable_testing() |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
if(LUA_FOUND AND PROTOBUF_FOUND) |
|
|
|
|