2021-05-10 23:06:04 +08:00
|
|
|
message("src/tim/vx")
|
|
|
|
|
|
|
|
|
|
set(TARGET_NAME "tim-vx")
|
|
|
|
|
|
|
|
|
|
add_subdirectory("vx/internal")
|
|
|
|
|
|
|
|
|
|
aux_source_directory(./vx VX_SRC)
|
|
|
|
|
aux_source_directory(./vx/ops OPS_SRC)
|
|
|
|
|
|
|
|
|
|
set(SRC)
|
|
|
|
|
list(APPEND SRC
|
|
|
|
|
${VX_SRC}
|
|
|
|
|
${OPS_SRC}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/include)
|
|
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/include/tim/vx)
|
|
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/src/tim/vx)
|
|
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/src/tim/vx/internal/include)
|
|
|
|
|
|
|
|
|
|
if(ENABLE_LAYOUT_INFER)
|
|
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/)
|
|
|
|
|
|
2021-05-11 09:46:46 +08:00
|
|
|
aux_source_directory(./transform LAYOUT_INFER_FRAMEWORK_SRCS)
|
|
|
|
|
aux_source_directory(./transform/ops LAYOUT_INFER_OP_SRCS)
|
2021-05-10 23:06:04 +08:00
|
|
|
|
|
|
|
|
list(APPEND SRC
|
|
|
|
|
${LAYOUT_INFER_FRAMEWORK_SRCS}
|
|
|
|
|
${LAYOUT_INFER_OP_SRCS}
|
|
|
|
|
)
|
2021-05-11 09:46:46 +08:00
|
|
|
list(REMOVE_ITEM SRC ./transform/layout_inference_test.cc)
|
2021-05-10 23:06:04 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
add_library(${TARGET_NAME} SHARED ${SRC})
|
|
|
|
|
target_link_libraries(${TARGET_NAME} PRIVATE
|
|
|
|
|
-Wl,--whole-archive tim_internal -Wl,--no-whole-archive)
|
|
|
|
|
|
|
|
|
|
add_library(${TARGET_NAME}-static STATIC ${SRC})
|
|
|
|
|
target_link_libraries(${TARGET_NAME}-static PRIVATE
|
|
|
|
|
-Wl,--whole-archive tim_internal -Wl,--no-whole-archive)
|
|
|
|
|
|
|
|
|
|
install(TARGETS ${TARGET_NAME} ${TARGET_NAME}-static
|
|
|
|
|
DESTINATION ${CMAKE_BINARY_DIR}/install/lib)
|
|
|
|
|
|
|
|
|
|
install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/tim/vx DESTINATION ${CMAKE_BINARY_DIR}/install/include/tim/)
|
|
|
|
|
|
|
|
|
|
if(ENABLE_LAYOUT_INFER)
|
2021-05-11 09:46:46 +08:00
|
|
|
install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/tim/transform DESTINATION ${CMAKE_BINARY_DIR}/install/include/tim/)
|
2021-05-11 13:44:32 +08:00
|
|
|
endif()
|