Skip to content

Commit

Permalink
[VTA] [CMake] hotfix tsim rules (#3650)
Browse files Browse the repository at this point in the history
  • Loading branch information
vegaluisjose authored and jroesch committed Jul 29, 2019
1 parent f55609b commit 6970fc3
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions cmake/modules/VTA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,17 @@ elseif(PYTHON)
if(${VTA_TARGET} STREQUAL "sim")
file(GLOB __vta_target_srcs vta/src/sim/*.cc)
endif()
# Add pynq driver sources
if(${VTA_TARGET} STREQUAL "pynq" OR ${VTA_TARGET} STREQUAL "ultra96")
file(GLOB __vta_target_srcs vta/src/pynq/*.cc)
endif()
list(APPEND VTA_RUNTIME_SRCS ${__vta_target_srcs})
# Add tsim driver sources
if(${VTA_TARGET} STREQUAL "tsim")
target_compile_definitions(vta PUBLIC USE_TSIM)
include_directories("vta/include")
file(GLOB __vta_target_srcs vta/src/tsim/*.cc)
file(GLOB RUNTIME_DPI_SRCS vta/src/dpi/module.cc)
list(APPEND RUNTIME_SRCS ${RUNTIME_DPI_SRCS})
endif()
# Add pynq driver sources
if(${VTA_TARGET} STREQUAL "pynq" OR ${VTA_TARGET} STREQUAL "ultra96")
file(GLOB __vta_target_srcs vta/src/pynq/*.cc)
endif()
list(APPEND VTA_RUNTIME_SRCS ${__vta_target_srcs})

add_library(vta SHARED ${VTA_RUNTIME_SRCS})

Expand All @@ -64,6 +63,12 @@ elseif(PYTHON)
target_compile_definitions(vta PUBLIC ${__strip_def})
endforeach()

# Enable tsim macro
if(${VTA_TARGET} STREQUAL "tsim")
include_directories("vta/include")
target_compile_definitions(vta PUBLIC USE_TSIM)
endif()

if(APPLE)
set_target_properties(vta PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
endif(APPLE)
Expand Down

1 comment on commit 6970fc3

@drord9
Copy link

@drord9 drord9 commented on 6970fc3 Aug 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#3747 ?

Please sign in to comment.