Skip to content

Commit

Permalink
fix: wrong cmake build order for sentencepieces
Browse files Browse the repository at this point in the history
  • Loading branch information
CameronNg committed Jun 18, 2024
1 parent e46d825 commit 4009a61
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cpp/tensorrt_llm/cortex.tensorrt-llm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ endif()
message(STATUS "SentencePiece library dirs: ${SENTENCEPIECE_LIBRARY_DIRS}")
message(STATUS "SentencePiece header dirs: ${SENTENCEPIECE_INCLUDE_DIRS}")

add_library(engine SHARED src/tensorrt-llm_engine.cc)

include_directories(${PROJECT_SOURCE_DIR}/include ${SENTENCEPIECE_INCLUDE_DIRS})

link_directories(${SENTENCEPIECE_LIBRARY_DIRS})
Expand All @@ -77,6 +75,7 @@ add_custom_target(engine_proj)
set(CXXOPTS_SRC_DIR ${PROJECT_SOURCE_DIR}/../3rdparty/cxxopts)
add_subdirectory(${CXXOPTS_SRC_DIR} ${CMAKE_CURRENT_BINARY_DIR}/cxxopts)

add_library(engine SHARED src/tensorrt-llm_engine.cc)
target_link_libraries(
engine PUBLIC ${SHARED_TARGET} nvinfer_plugin_tensorrt_llm cxxopts::cxxopts sentencepiece PRIVATE ${JSONCPP} ${TRANTOR} ${CMAKE_THREAD_LIBS_INIT} )

Expand Down

0 comments on commit 4009a61

Please sign in to comment.