Skip to content

Commit 5bdb1b3

Browse files
committed
Addressed review comments
1 parent 699361f commit 5bdb1b3

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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")
6869
else()
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 ---------------------------------------------------------------------------------

build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ VERBOSE=""
4040
BUILD_TYPE=Release
4141
INSTALL_TARGET=install
4242
PYTHON=${PYTHON:=python}
43-
CUDA_RUNTIME_LIBRARY=Shared
43+
CUDA_STATIC_RUNTIME=OFF
4444
RAN_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=""
9696
fi
9797
if hasArg -s; then
98-
CUDA_RUNTIME_LIBRARY=Static
98+
CUDA_STATIC_RUNTIME=ON
9999
fi
100100

101101
# If clean given, run it prior to any other steps

0 commit comments

Comments
 (0)