File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,16 @@ SET(WARPCTC_LIB_DIR "${WARPCTC_INSTALL_DIR}/lib" CACHE PATH "Warp-ctc Library Di
24
24
25
25
IF (WIN32 )
26
26
SET (WARPCTC_LIBRARIES
27
- "${WARPCTC_INSTALL_DIR} /lib/warpctc.lib " CACHE FILEPATH "Warp-ctc Library" FORCE )
27
+ "${WARPCTC_INSTALL_DIR} /lib/warpctc.dll " CACHE FILEPATH "Warp-ctc Library" FORCE )
28
28
ELSE (WIN32 )
29
+ IF (APPLE )
30
+ SET (_warpctc_SHARED_SUFFIX dylib )
31
+ ELSE (APPLE )
32
+ SET (_warpctc_SHARED_SUFFIX so )
33
+ ENDIF (APPLE )
34
+
29
35
SET (WARPCTC_LIBRARIES
30
- "${WARPCTC_INSTALL_DIR} /lib/libwarpctc.a " CACHE FILEPATH "Warp-ctc Library" FORCE )
36
+ "${WARPCTC_INSTALL_DIR} /lib/libwarpctc.${_warpctc_SHARED_SUFFIX} " CACHE FILEPATH "Warp-ctc Library" FORCE )
31
37
ENDIF (WIN32 )
32
38
33
39
IF (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" )
@@ -48,7 +54,7 @@ ExternalProject_Add(
48
54
CMAKE_ARGS -DWITH_GPU=${WITH_GPU}
49
55
CMAKE_ARGS -DWITH_OMP=${USE_OMP}
50
56
CMAKE_ARGS -DWITH_TORCH=OFF
51
- CMAKE_ARGS -DBUILD_SHARED=OFF
57
+ CMAKE_ARGS -DBUILD_SHARED=ON
52
58
)
53
59
54
60
LIST (APPEND external_project_dependencies warpctc )
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ if(NOT WITH_DOUBLE)
80
80
test_WarpCTCLayer.cpp )
81
81
82
82
add_test (NAME test_WarpCTCLayer
83
- COMMAND ${CMAKE_CURRENT_BINARY_DIR} /test_WarpCTCLayer
83
+ COMMAND ${CMAKE_CURRENT_BINARY_DIR} /test_WarpCTCLayer --warpctc_dir=${WARPCTC_LIB_DIR}
84
84
WORKING_DIRECTORY ${PROJ_ROOT} /paddle )
85
85
endif ()
86
86
You can’t perform that action at this time.
0 commit comments