
orc_rt_WrapperFunctionResult is a byte-buffer with inline storage and a builtin error state. It is intended as a general purpose return type for functions that return a serialized result (e.g. for communication across ABIs or via IPC/RPC). orc_rt_WrapperFunctionResult contains a small amount of inline storage, allowing it to avoid heap-allocation for small return types (e.g. bools, chars, pointers).
25 lines
681 B
CMake
25 lines
681 B
CMake
add_custom_target(OrcRTUnitTests)
|
|
set_target_properties(OrcRTUnitTests PROPERTIES FOLDER "orc-rt/Tests")
|
|
|
|
if (NOT TARGET llvm_gtest)
|
|
message(WARNING "orc-rt unittests disabled due to GTest being unavailable; "
|
|
"Try LLVM_INSTALL_GTEST=ON for the LLVM build")
|
|
return ()
|
|
endif ()
|
|
|
|
function(add_orc_rt_unittest test_dirname)
|
|
add_unittest(OrcRTUnitTests ${test_dirname} ${ARGN})
|
|
endfunction()
|
|
|
|
add_orc_rt_unittest(CoreTests
|
|
BitmaskEnumTest.cpp
|
|
ErrorTest.cpp
|
|
MathTest.cpp
|
|
RTTITest.cpp
|
|
WrapperFunctionResultTest.cpp
|
|
move_only_function-test.cpp
|
|
span-test.cpp
|
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
|
)
|
|
target_link_libraries(CoreTests PRIVATE orc-rt-executor)
|