-
Notifications
You must be signed in to change notification settings - Fork 62
/
CMakeLists.txt
25 lines (22 loc) · 1.1 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
set(EXAMPLES_OUT_DIR ${PROJECT_BINARY_DIR}/examples_out)
file(MAKE_DIRECTORY ${EXAMPLES_OUT_DIR})
function(create_example example_name)
message(STATUS "RTNeural -- Configuring example: ${example_name}")
add_executable(${example_name} ${example_name}.cpp)
target_include_directories(${example_name} PUBLIC ${CMAKE_SOURCE_DIR})
target_link_libraries(${example_name} PUBLIC RTNeural)
target_compile_features(${example_name} PRIVATE cxx_std_17)
add_custom_command(TARGET ${example_name}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo "copying $<TARGET_FILE:${example_name}> to ${EXAMPLES_OUT_DIR}/${example_name}"
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${example_name}> ${EXAMPLES_OUT_DIR}/${example_name})
endfunction()
add_subdirectory(hello_rtneural)
add_subdirectory(rtneural_static_model)
add_subdirectory(rtneural_dynamic_model)
add_subdirectory(custom_layer_model)
if(RTNEURAL_EIGEN OR RTNEURAL_STL)
add_subdirectory(conv1d_stateless_example)
endif()
add_subdirectory(torch/torch_conv1d)
add_subdirectory(torch/torch_gru)