File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -61,13 +61,14 @@ option(BUILD_BENCHMARKS "Configure CMake to build (google) benchmarks" OFF)
6161# - cudart options --------------------------------------------------------------------------------
6262# cudart can be statically linked or dynamically linked the python ecosystem wants dynamic linking
6363
64+ option (CUDA_STATIC_RUNTIME "Statically link the CUDA runtime" OFF )
6465
65- if (CUDA_RUNTIME_LIBRARY AND CUDA_RUNTIME_LIBRARY MATCHES "^Static$" )
66+ if (CUDA_STATIC_RUNTIME )
6667 message (STATUS "Enabling static linking of cudart" )
6768 set (CUDART_LIBRARY "cudart_static" )
6869else ()
6970 set (CUDART_LIBRARY "cudart" )
70- endif (CUDA_RUNTIME_LIBRARY AND CUDA_RUNTIME_LIBRARY MATCHES "^Static$" )
71+ endif (CUDA_STATIC_RUNTIME )
7172
7273###################################################################################################
7374# - cnmem ---------------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ VERBOSE=""
4040BUILD_TYPE=Release
4141INSTALL_TARGET=install
4242PYTHON=${PYTHON:= python}
43- CUDA_RUNTIME_LIBRARY=Shared
43+ CUDA_STATIC_RUNTIME=OFF
4444RAN_CMAKE=0
4545
4646# Set defaults for vars that may not have been defined externally
@@ -61,7 +61,7 @@ function ensureCMakeRan {
6161 if (( RAN_CMAKE == 0 )) ; then
6262 echo " Executing cmake for librmm..."
6363 cmake -DCMAKE_INSTALL_PREFIX=" ${INSTALL_PREFIX} " \
64- -DCUDA_RUNTIME_LIBRARY =" ${CUDA_RUNTIME_LIBRARY } " \
64+ -DCUDA_STATIC_RUNTIME =" ${CUDA_STATIC_RUNTIME } " \
6565 -DCMAKE_CXX11_ABI=ON \
6666 -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
6767 RAN_CMAKE=1
@@ -95,7 +95,7 @@ if hasArg -n; then
9595 INSTALL_TARGET=" "
9696fi
9797if hasArg -s; then
98- CUDA_RUNTIME_LIBRARY=Static
98+ CUDA_STATIC_RUNTIME=ON
9999fi
100100
101101# If clean given, run it prior to any other steps
You can’t perform that action at this time.
0 commit comments