File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- MODE=$1 # whether to install using sudo or not
2
+ MODE=$1
3
3
set -e
4
4
5
5
$MODE apk update
6
+ $MODE apk add --no-cache build-base gcc g++ make wget git valgrind linux-headers cmake
6
7
7
- $MODE apk add --no-cache build-base gcc g++ make wget git valgrind linux-headers
8
+ # Force C++17 and prevent the C++20 deprecation from being a hard error
9
+ export CXXFLAGS=" $CXXFLAGS -std=gnu++17 -Wno-error=deprecated -Wno-error=deprecated-declarations"
10
+ export CFLAGS=" $CFLAGS -std=gnu++17"
8
11
9
- $MODE apk add --no-cache cmake
12
+ # (Optional) persist for subsequent CI steps/shells
13
+ echo ' export CXXFLAGS="$CXXFLAGS -std=gnu++17 -Wno-error=deprecated -Wno-error=deprecated-declarations"' | $MODE tee /etc/profile.d/cpp17.sh > /dev/null
14
+ echo ' export CFLAGS="$CFLAGS -std=gnu++17"' | $MODE tee -a /etc/profile.d/cpp17.sh > /dev/null
You can’t perform that action at this time.
0 commit comments