Skip to content

Commit

Permalink
added cpp static library creation along with C static library
Browse files Browse the repository at this point in the history
  • Loading branch information
pranav-159 committed Jan 11, 2024
1 parent 004052e commit 42dca02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ endif(LLVM_MLBRIDGE)

llvm_map_components_to_libnames(llvm_libs support core irreader analysis TransformUtils)


add_library(MLCompilerBridge STATIC tools.cpp)
target_link_libraries(MLCompilerBridge PUBLIC SerDesLib ModelRunnerLib ONNXModelRunnerLib LLVM-10 ${llvm_libs})

add_library(MLCompilerBridgeC STATIC $<TARGET_OBJECTS:ModelRunnerCWrapper>)
target_link_libraries(MLCompilerBridgeC PUBLIC SerDesCLib ModelRunnerCLib ONNXModelRunnerLib LLVM-10 ${llvm_libs})
target_include_directories(MLCompilerBridgeC PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ${LLVM_INCLUDE_DIRS})
Expand Down
3 changes: 1 addition & 2 deletions SerDes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ if(LLVM_MLBRIDGE)
else()
add_library(SerDesLib OBJECT TensorSpec.cpp jsonSerDes.cpp bitstreamSerDes.cpp protobufSerDes.cpp tensorflowSerDes.cpp JSON.cpp)

add_library(SerDesCLib OBJECT TensorSpec.cpp jsonSerDes.cpp bitstreamSerDes.cpp tensorflowSerDes.cpp protobufSerDes.cpp JSON.cpp)
target_include_directories(SerDesCLib PRIVATE ${TENSORFLOW_AOT_PATH}/include)
add_library(SerDesCLib OBJECT TensorSpec.cpp jsonSerDes.cpp bitstreamSerDes.cpp JSON.cpp)
endif()

target_include_directories(SerDesLib PRIVATE ${TENSORFLOW_AOT_PATH}/include)

0 comments on commit 42dca02

Please sign in to comment.