diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index ce38a584d8e..8dfc50c6020 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -143,7 +143,7 @@ if (CUSTATEVEC_ROOT AND CUDA_FOUND) find_library(NVIDIA_ML NAMES nvidia-ml PATHS ${NVIDIA_ML_PATH}) message(STATUS "NVIDIA ML lib: ${NVIDIA_ML}") # Inject the file during build and remove it after build (install) - file(CREATE_LINK ${NVIDIA_ML} ${CMAKE_CURRENT_BINARY_DIR}/libnvidia-ml.so.1) + file(CREATE_LINK ${NVIDIA_ML} ${CMAKE_CURRENT_BINARY_DIR}/libnvidia-ml.so.1 SYMBOLIC) link_directories(${CMAKE_CURRENT_BINARY_DIR}) install(CODE "file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/libnvidia-ml.so.1)") endif()