From cca7c62bf3f561649dc826e49a5115f02de3c38e Mon Sep 17 00:00:00 2001 From: Thilina Ratnayaka Date: Wed, 20 Nov 2024 14:17:03 -0600 Subject: [PATCH] Prefix user variables in CMake configure scripts (#771) --- configure-cmake.sh | 12 ++++++------ configure-sycl-nv-cmake.sh | 13 ++++++------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/configure-cmake.sh b/configure-cmake.sh index 3d26e19ca..3d2bdb625 100755 --- a/configure-cmake.sh +++ b/configure-cmake.sh @@ -8,9 +8,9 @@ #FFLAGS= # Default build parameters -: ${BUILD_DIR:=`pwd`/build} -: ${INSTALL_DIR:=`pwd`/install} -: ${BUILD_TYPE:="RelWithDebInfo"} +: ${OCCA_BUILD_DIR:=`pwd`/build} +: ${OCCA_INSTALL_DIR:=`pwd`/install} +: ${OCCA_BUILD_TYPE:="RelWithDebInfo"} : ${CC:="gcc"} : ${CXX:="g++"} @@ -26,9 +26,9 @@ : ${OCCA_ENABLE_TESTS="ON"} : ${OCCA_ENABLE_EXAMPLES="ON"} -cmake -S . -B ${BUILD_DIR} \ - -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \ +cmake -S . -B ${OCCA_BUILD_DIR} \ + -DCMAKE_BUILD_TYPE=${OCCA_BUILD_TYPE} \ + -DCMAKE_INSTALL_PREFIX=${OCCA_INSTALL_DIR} \ -DCMAKE_C_COMPILER=${CC} \ -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_Fortran_COMPILER=${FC} \ diff --git a/configure-sycl-nv-cmake.sh b/configure-sycl-nv-cmake.sh index ea773ae81..ada90a4f9 100755 --- a/configure-sycl-nv-cmake.sh +++ b/configure-sycl-nv-cmake.sh @@ -10,11 +10,10 @@ export OCCA_DPCPP_COMPILER_FLAGS="-fsycl -fsycl-targets=nvptx64-nvidia-cuda" CC=clang CXX=clang++ #FC= - # Default build parameters -: ${BUILD_DIR:=`pwd`/build} -: ${INSTALL_DIR:=`pwd`/install} -: ${BUILD_TYPE:="RelWithDebInfo"} +: ${OCCA_BUILD_DIR:=`pwd`/build} +: ${OCCA_INSTALL_DIR:=`pwd`/install} +: ${OCCA_BUILD_TYPE:="RelWithDebInfo"} : ${CC:="gcc"} : ${CXX:="g++"} @@ -30,9 +29,9 @@ CXX=clang++ : ${OCCA_ENABLE_TESTS="ON"} : ${OCCA_ENABLE_EXAMPLES="ON"} -cmake -S . -B ${BUILD_DIR} \ - -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \ +cmake -S . -B ${OCCA_BUILD_DIR} \ + -DCMAKE_BUILD_TYPE=${OCCA_BUILD_TYPE} \ + -DCMAKE_INSTALL_PREFIX=${OCCA_INSTALL_DIR} \ -DCMAKE_C_COMPILER=${CC} \ -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_Fortran_COMPILER=${FC} \