Skip to content

Commit

Permalink
Using CompilerInterface from build dir
Browse files Browse the repository at this point in the history
  • Loading branch information
RajivChitale committed Feb 5, 2024
1 parent 289c68d commit 0846ba6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ add_subdirectory(MLModelRunner)
add_subdirectory(SerDes)
add_subdirectory(test)

add_custom_target(copy)
add_custom_command(TARGET copy PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy CompilerInterface ${CMAKE_CURRENT_BINARY_DIR}/MLModelRunner/CompilerInterface)

if(LLVM_MLBRIDGE)
include(AddLLVM)
Expand All @@ -54,8 +52,6 @@ if(LLVM_MLBRIDGE)
ADDITIONAL_HEADER_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/include

DEPENDS
copy

LINK_LIBS
ModelRunnerLib
Expand Down Expand Up @@ -94,3 +90,4 @@ endif(LLVM_MLBRIDGE)

install(DIRECTORY include/ DESTINATION include)
install(DIRECTORY CompilerInterface DESTINATION MLModelRunner/CompilerInterface)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/CompilerInterface DESTINATION ${CMAKE_BINARY_DIR}/MLModelRunner/)
2 changes: 1 addition & 1 deletion test/mlbridge-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
BUILD_DIR = "../build_release"
sys.path.extend(
[
"../CompilerInterface",
f"{BUILD_DIR}/MLModelRunner/CompilerInterface",
f"{BUILD_DIR}/MLModelRunner/gRPCModelRunner/Python-Utilities",
]
)
Expand Down

0 comments on commit 0846ba6

Please sign in to comment.