CMakeLists.txt 582 Bytes
Newer Older
Paul's avatar
Paul committed
1
2
3
find_package(Protobuf REQUIRED)

protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS onnx.proto)
Paul's avatar
Paul committed
4
5
6
7
add_library(onnx-proto STATIC ${PROTO_SRCS})
target_include_directories(onnx-proto SYSTEM PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${PROTOBUF_INCLUDE_DIR})
target_compile_options(onnx-proto PRIVATE -w)
target_link_libraries(onnx-proto PRIVATE ${PROTOBUF_LIBRARY})
Paul's avatar
Paul committed
8

Paul's avatar
Paul committed
9
10
11
12
add_library(rtg_onnx onnx.cpp)
rocm_clang_tidy_check(rtg_onnx)
target_link_libraries(rtg_onnx onnx-proto rtg)

Paul's avatar
Paul committed
13
14
add_executable(read_onnx read_onnx.cpp)
rocm_clang_tidy_check(read_onnx)
Paul's avatar
Paul committed
15
target_link_libraries(read_onnx rtg_onnx rtg_cpu)