Skip to content

Commit

Permalink
chg: updated to -std=c++2a/latest
Browse files Browse the repository at this point in the history
  • Loading branch information
elsamuko committed Mar 19, 2020
1 parent 233d9e8 commit 3fc1c96
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cppsh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function createHelper {
fi

echo -e ' > nul\r\n' >> "$HELPER"
echo -e 'cl /EHsc /std:c++17 /nologo /D"_UNICODE" /D"UNICODE" %*' >> "$HELPER"
echo -e 'cl /EHsc /std:c++latest /nologo /D"_UNICODE" /D"UNICODE" %*' >> "$HELPER"
chmod +x "$HELPER"
}

Expand Down Expand Up @@ -145,21 +145,21 @@ function doCompile {

case $(uname) in
Linux)
[[ -n "$VERBOSE" ]] && echo "g++ -I. $CPPFLAGS -std=c++17 $CXXFLAGS \"$TEMP_CPP\" -o \"$BIN\" $LDFLAGS -pthread $LIBS -lstdc++fs"
[[ -n "$VERBOSE" ]] && echo "g++ -I. $CPPFLAGS -std=c++2a $CXXFLAGS \"$TEMP_CPP\" -o \"$BIN\" $LDFLAGS -pthread $LIBS -lstdc++fs"
# shellcheck disable=SC2086
g++ -I. $CPPFLAGS -std=c++17 $CXXFLAGS "$TEMP_CPP" -o "$BIN" $LDFLAGS -pthread $LIBS -lstdc++fs &> "$LOG"
g++ -I. $CPPFLAGS -std=c++2a $CXXFLAGS "$TEMP_CPP" -o "$BIN" $LDFLAGS -pthread $LIBS -lstdc++fs &> "$LOG"
;;
Darwin)
[[ -n "$VERBOSE" ]] && echo "clang++ -I. $CPPFLAGS -std=c++17 -stdlib=libc++ $CXXFLAGS \"$TEMP_CPP\" -o \"$BIN\" $LDFLAGS $LIBS"
[[ -n "$VERBOSE" ]] && echo "clang++ -I. $CPPFLAGS -std=c++2a -stdlib=libc++ $CXXFLAGS \"$TEMP_CPP\" -o \"$BIN\" $LDFLAGS $LIBS"
# shellcheck disable=SC2086
clang++ -I. $CPPFLAGS -std=c++17 -stdlib=libc++ $CXXFLAGS "$TEMP_CPP" -o "$BIN" $LDFLAGS $LIBS -lpthread &> "$LOG"
clang++ -I. $CPPFLAGS -std=c++2a -stdlib=libc++ $CXXFLAGS "$TEMP_CPP" -o "$BIN" $LDFLAGS $LIBS -lpthread &> "$LOG"
;;
CYGWIN*)
WTEMP_DIR=$(cygpath -w "$TEMP_DIR")
WTEMP_CPP=$(cygpath -w "$TEMP_CPP")
WBIN=$(cygpath -w "$BIN")
createHelper
[[ -n "$VERBOSE" ]] && echo "cl /EHsc /std:c++17 /nologo /D_UNICODE /DUNICODE /I. $CPPFLAGS $CXXFLAGS \"$WTEMP_CPP\" /Fo\"$WTEMP_DIR\\\" /Fe\"$WBIN\" $LDFLAGS $LIBS"
[[ -n "$VERBOSE" ]] && echo "cl /EHsc /std:c++latest /nologo /D_UNICODE /DUNICODE /I. $CPPFLAGS $CXXFLAGS \"$WTEMP_CPP\" /Fo\"$WTEMP_DIR\\\" /Fe\"$WBIN\" $LDFLAGS $LIBS"
# shellcheck disable=SC2086
"$HELPER" /I. $CPPFLAGS $CXXFLAGS "$WTEMP_CPP" /Fo"$WTEMP_DIR\\" /Fe"$WBIN" $LDFLAGS $LIBS &> "$LOG"
;;
Expand All @@ -168,7 +168,7 @@ function doCompile {
WTEMP_CPP=$(cygpath -w "$TEMP_CPP")
WBIN=$(cygpath -w "$BIN")
createHelper
[[ -n "$VERBOSE" ]] && echo "cl /EHsc /std:c++17 /nologo /D_UNICODE /DUNICODE /I. $CPPFLAGS $CXXFLAGS \"$WTEMP_CPP\" /Fo\"$WTEMP_DIR\\\" /Fe\"$WBIN\" $LDFLAGS $LIBS"
[[ -n "$VERBOSE" ]] && echo "cl /EHsc /std:c++latest /nologo /D_UNICODE /DUNICODE /I. $CPPFLAGS $CXXFLAGS \"$WTEMP_CPP\" /Fo\"$WTEMP_DIR\\\" /Fe\"$WBIN\" $LDFLAGS $LIBS"
# shellcheck disable=SC2086
"$HELPER" //I. $CPPFLAGS $CXXFLAGS "$WTEMP_CPP" //Fo"$WTEMP_DIR\\" //Fe"$WBIN" $LDFLAGS $LIBS &> "$LOG"
;;
Expand Down

0 comments on commit 3fc1c96

Please # to comment.