2020-01-21 01:30:08 +08:00
|
|
|
configure_file(test.py test.py COPYONLY)
|
|
|
|
configure_file(test_config.py.in test_config.py)
|
|
|
|
|
|
|
|
find_package(PythonInterp 3 REQUIRED)
|
2020-05-04 20:37:58 +08:00
|
|
|
|
|
|
|
set(LD_PRELOADS $<TARGET_FILE:cruntime>)
|
|
|
|
|
|
|
|
get_filename_component(CXX_BIN_DIR ${CMAKE_CXX_COMPILER} PATH)
|
|
|
|
set(LIBSTDCXX_LIB "${CXX_BIN_DIR}/../lib64/libstdc++.so")
|
|
|
|
if(EXISTS ${LIBSTDCXX_LIB})
|
|
|
|
set(LD_PRELOADS ${LIBSTDCXX_LIB}:${LD_PRELOADS})
|
|
|
|
endif()
|
|
|
|
|
2020-03-31 22:06:14 +08:00
|
|
|
add_custom_target(check-onnx-backend
|
2020-05-14 09:04:16 +08:00
|
|
|
COMMAND ${PYTHON_EXECUTABLE}
|
2020-01-21 01:30:08 +08:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/test.py)
|
|
|
|
|
2020-03-31 22:06:14 +08:00
|
|
|
add_dependencies(check-onnx-backend onnx-mlir)
|
2020-06-08 10:18:55 +08:00
|
|
|
add_dependencies(check-onnx-backend PyRuntime)
|