-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure-cmake.sh
executable file
·37 lines (30 loc) · 1.01 KB
/
configure-cmake.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# !/bin/bash
# CC=icx
# CXX=icpx
# CXXFLAGS=-pg
# For now assume we have an external OCCA build
EXTERNAL_OCCA=ON
export LIBP_DIR="/gpfs/alpine/scratch/umeshu/cfd144/forks/cmake-libp/libparanumal/install"
# A semicolon separated list of non-default paths to dependencies
PREFIX_PATHS="${CMPROOT}/linux;${CMPROOT}/linux/include/sycl;${CMPROOT}/linux/compiler"
# Default build parameters
: ${BUILD_DIR:=`pwd`/build}
: ${INSTALL_PATH:=`pwd`/install}
: ${BUILD_TYPE:="RelWithDebInfo"}
: ${CC:="gcc"}
: ${CXX:="g++"}
: ${MPICC:="mpicc"}
: ${MPICXX:="mpicxx"}
cmake -S . -B ${BUILD_DIR} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} \
-DCMAKE_PREFIX_PATH=${PREFIX_PATHS} \
-DCMAKE_C_COMPILER=${CC} \
-DCMAKE_CXX_COMPILER=${CXX} \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DMPI_C_COMPILER=${MPICC} \
-DMPI_CXX_COMPILER=${MPICXX} \
-DEXTERNAL_OCCA=${EXTERNAL_OCCA}
cmake --build ${BUILD_DIR} --parallel 8
# cmake --install ${BUILD_DIR} --prefix ${INSTALL_PATH}