Skip to content

Commit

Permalink
fix libtvm build dependencies when USE_MICRO is ON. (apache#6524)
Browse files Browse the repository at this point in the history
* previously, building from scratch would fail with Unix Makefiles
   due to cmake limitation
  • Loading branch information
areusch authored and Tushar Dey committed Oct 15, 2020
1 parent 6468ab2 commit b984338
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,13 @@ set_property(TARGET tvm APPEND PROPERTY LINK_OPTIONS "${TVM_VISIBILITY_FLAGS}")
add_library(tvm_runtime SHARED $<TARGET_OBJECTS:tvm_runtime_objs>)
set_property(TARGET tvm_runtime APPEND PROPERTY LINK_OPTIONS "${TVM_VISIBILITY_FLAGS}")

if(USE_MICRO)
# NOTE: cmake doesn't track dependencies at the file level across subdirectories. For the
# Unix Makefiles generator, need to add these explicit target-level dependency)
add_dependencies(tvm host_standalone_crt)
add_dependencies(tvm_runtime host_standalone_crt)
endif()

if(USE_CPP_RPC)
add_subdirectory("apps/cpp_rpc")
endif()
Expand Down

0 comments on commit b984338

Please sign in to comment.