Skip to content

Commit aa493e5

Browse files
committed
change alpine install script
1 parent fae4b66 commit aa493e5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.install/alpine_linux_3.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
#!/bin/bash
2-
MODE=$1 # whether to install using sudo or not
2+
MODE=$1
33
set -e
44

55
$MODE apk update
6+
$MODE apk add --no-cache build-base gcc g++ make wget git valgrind linux-headers cmake
67

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"
811

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

0 commit comments

Comments
 (0)