Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build.sh use cmake --build to drive build system invocation #7270

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 16 additions & 20 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ CUSTREAMZ_BUILD_DIR=${REPODIR}/python/custreamz/build
BUILD_DIRS="${LIB_BUILD_DIR} ${CUDF_BUILD_DIR} ${DASK_CUDF_BUILD_DIR} ${KAFKA_LIB_BUILD_DIR} ${CUDF_KAFKA_BUILD_DIR} ${CUSTREAMZ_BUILD_DIR}"

# Set defaults for vars modified by flags to this script
VERBOSE=""
VERBOSE_FLAG=""
BUILD_TYPE=Release
INSTALL_TARGET=install
BUILD_BENCHMARKS=OFF
Expand Down Expand Up @@ -92,7 +92,7 @@ fi

# Process flags
if hasArg -v; then
VERBOSE=1
VERBOSE_FLAG="-v"
fi
if hasArg -g; then
BUILD_TYPE=Debug
Expand Down Expand Up @@ -146,32 +146,28 @@ fi
# Configure, build, and install libcudf

if buildAll || hasArg libcudf; then
mkdir -p ${LIB_BUILD_DIR}
cd ${LIB_BUILD_DIR}
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
cmake -S $REPODIR/cpp -B ${LIB_BUILD_DIR} \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
${GPU_ARCH} \
-DUSE_NVTX=${BUILD_NVTX} \
-DBUILD_BENCHMARKS=${BUILD_BENCHMARKS} \
-DDISABLE_DEPRECATION_WARNING=${BUILD_DISABLE_DEPRECATION_WARNING} \
-DPER_THREAD_DEFAULT_STREAM=${BUILD_PER_THREAD_DEFAULT_STREAM} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} $REPODIR/cpp
fi

if buildAll || hasArg libcudf; then
-DCMAKE_BUILD_TYPE=${BUILD_TYPE}

cd ${LIB_BUILD_DIR}
if [[ ${INSTALL_TARGET} != "" ]]; then
make -j${PARALLEL_LEVEL} install_cudf VERBOSE=${VERBOSE}
cmake --build . -j${PARALLEL_LEVEL} --target install_cudf ${VERBOSE_FLAG}
else
make -j${PARALLEL_LEVEL} cudf VERBOSE=${VERBOSE}
cmake --build . -j${PARALLEL_LEVEL} --target cudf ${VERBOSE_FLAG}
fi

if [[ ${BUILD_TESTS} == "ON" ]]; then
make -j${PARALLEL_LEVEL} build_tests_cudf VERBOSE=${VERBOSE}
cmake --build . -j${PARALLEL_LEVEL} --target build_tests_cudf ${VERBOSE_FLAG}
fi

if [[ ${BUILD_BENCHMARKS} == "ON" ]]; then
make -j${PARALLEL_LEVEL} build_benchmarks_cudf VERBOSE=${VERBOSE}
cmake --build . -j${PARALLEL_LEVEL} --target build_benchmarks_cudf ${VERBOSE_FLAG}
fi
fi

Expand Down Expand Up @@ -201,19 +197,19 @@ fi

# Build libcudf_kafka library
if hasArg libcudf_kafka; then
mkdir -p ${KAFKA_LIB_BUILD_DIR}
cd ${KAFKA_LIB_BUILD_DIR}
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} $REPODIR/cpp/libcudf_kafka
cmake -S $REPODIR/cpp/libcudf_kafka -B ${KAFKA_LIB_BUILD_DIR} \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE}

cd ${KAFKA_LIB_BUILD_DIR}
if [[ ${INSTALL_TARGET} != "" ]]; then
make -j${PARALLEL_LEVEL} install VERBOSE=${VERBOSE}
cmake --build . -j${PARALLEL_LEVEL} --target install ${VERBOSE_FLAG}
else
make -j${PARALLEL_LEVEL} libcudf_kafka VERBOSE=${VERBOSE}
cmake --build . -j${PARALLEL_LEVEL} --target libcudf_kafka ${VERBOSE_FLAG}
fi

if [[ ${BUILD_TESTS} == "ON" ]]; then
make -j${PARALLEL_LEVEL} build_tests_libcudf_kafka VERBOSE=${VERBOSE}
cmake --build . -j${PARALLEL_LEVEL} --target build_tests_libcudf_kafka ${VERBOSE_FLAG}
fi
fi

Expand Down