Skip to content

Commit

Permalink
Prefix user variables in CMake configure scripts (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
thilinarmtb authored Nov 20, 2024
1 parent 4ac4209 commit cca7c62
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
12 changes: 6 additions & 6 deletions configure-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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++"}
Expand All @@ -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} \
Expand Down
13 changes: 6 additions & 7 deletions configure-sycl-nv-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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++"}
Expand All @@ -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} \
Expand Down

0 comments on commit cca7c62

Please sign in to comment.