Skip to content

Commit cbae9ab

Browse files
authored
Some fixes for build.sh (#901)
Authors: - Corey J. Nolet (https://github.com/cjnolet) Approvers: - Robert Maynard (https://github.com/robertmaynard) URL: #901
1 parent e2b6399 commit cbae9ab

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

build.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,11 @@ if (( ${NUMARGS} == 0 )) || hasArg libraft || hasArg docs || hasArg tests || has
329329
fi
330330

331331
# Build and (optionally) install the raft-dask Python package
332-
if (( ${NUMARGS} == 0 )) || hasArg raft-dask || hasArg docs; then
332+
if (( ${NUMARGS} == 0 )) || hasArg raft-dask; then
333+
# Append `-DFIND_RAFT_CPP=ON` to EXTRA_CMAKE_ARGS unless a user specified the option.
334+
if [[ "${EXTRA_CMAKE_ARGS}" != *"DFIND_RAFT_CPP"* ]]; then
335+
EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS} -DFIND_RAFT_CPP=ON"
336+
fi
333337

334338
cd ${REPODIR}/python/raft-dask
335339
python setup.py build_ext --inplace -- -DCMAKE_PREFIX_PATH="${LIBRAFT_BUILD_DIR};${INSTALL_PREFIX}" -DCMAKE_LIBRARY_PATH=${LIBRAFT_BUILD_DIR} ${EXTRA_CMAKE_ARGS} -- -j${PARALLEL_LEVEL:-1}
@@ -340,6 +344,10 @@ fi
340344

341345
# Build and (optionally) install the pylibraft Python package
342346
if (( ${NUMARGS} == 0 )) || hasArg pylibraft; then
347+
# Append `-DFIND_RAFT_CPP=ON` to EXTRA_CMAKE_ARGS unless a user specified the option.
348+
if [[ "${EXTRA_CMAKE_ARGS}" != *"DFIND_RAFT_CPP"* ]]; then
349+
EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS} -DFIND_RAFT_CPP=ON"
350+
fi
343351

344352
cd ${REPODIR}/python/pylibraft
345353
python setup.py build_ext --inplace -- -DCMAKE_PREFIX_PATH="${LIBRAFT_BUILD_DIR};${INSTALL_PREFIX}" -DCMAKE_LIBRARY_PATH=${LIBRAFT_BUILD_DIR} ${EXTRA_CMAKE_ARGS} -- -j${PARALLEL_LEVEL:-1}

0 commit comments

Comments
 (0)