From 934ba0bf3985472135df219bfbd13783d161411d Mon Sep 17 00:00:00 2001 From: liaogang Date: Sun, 8 Jan 2017 12:59:33 +0800 Subject: [PATCH] Disable dynamic linked cuda libs default --- CMakeLists.txt | 2 +- cmake/util.cmake | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ed757bd1..804fe4359 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ include(system) include(simd) ###################### Configurations ############################ -option(WITH_DSO "Compile PaddlePaddle with dynamic linked libraries" ON) +option(WITH_DSO "Compile PaddlePaddle with dynamic linked libraries" OFF) option(WITH_GPU "Compile PaddlePaddle with gpu" ${CUDA_FOUND}) option(WITH_DOUBLE "Compile PaddlePaddle with double precision, otherwise use single precision" OFF) option(WITH_AVX "Compile PaddlePaddle with avx intrinsics" ${AVX_FOUND}) diff --git a/cmake/util.cmake b/cmake/util.cmake index a19bf2a79..a6cb74853 100644 --- a/cmake/util.cmake +++ b/cmake/util.cmake @@ -120,6 +120,11 @@ function(link_paddle_exe TARGET_NAME) target_link_libraries(${TARGET_NAME} rt) endif() endif() + + if(NOT WITH_DSO) + target_link_libraries(${TARGET_NAME} ${WARPCTC_LIBRARIES}) + endif() + add_dependencies(${TARGET_NAME} ${external_project_dependencies}) endfunction() -- GitLab