-
Notifications
You must be signed in to change notification settings - Fork 100
/
blueos_clang.sh
executable file
·43 lines (35 loc) · 1.18 KB
/
blueos_clang.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
38
39
40
41
42
43
#!/usr/bin/env bash
###############################################################################
# Copyright (c) 2016-22, Lawrence Livermore National Security, LLC
# and RAJA project contributors. See the RAJA/LICENSE file for details.
#
# SPDX-License-Identifier: (BSD-3-Clause)
###############################################################################
if [ "$1" == "" ]; then
echo
echo "You must pass a compiler version number to script. For example,"
echo " blueos_clang.sh 11.0.1"
echo " -or - "
echo " blueos_clang.sh ibm-10.0.1-gcc-8.3.1"
exit
fi
COMP_VER=$1
shift 1
BUILD_SUFFIX=lc_blueos-clang-${COMP_VER}
echo
echo "Creating build directory build_${BUILD_SUFFIX} and generating configuration in it"
echo "Configuration extra arguments:"
echo " $@"
echo
rm -rf build_${BUILD_SUFFIX} 2>/dev/null
mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX}
module load cmake/3.20.2
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=/usr/tce/packages/clang/clang-${COMP_VER}/bin/clang++ \
-DBLT_CXX_STD=c++14 \
-C ../host-configs/lc-builds/blueos/clang_X.cmake \
-DENABLE_OPENMP=On \
-DCMAKE_INSTALL_PREFIX=../install_${BUILD_SUFFIX} \
"$@" \
..