toolkit/func/core/pkg_gcc/11-gcc-build-cpp.sh

9 lines
211 B
Bash
Executable file

#!/bin/bash
r_log "gcc" "Ensure g++ can build a simple program"
OUTPUTPROG=$(mktemp)
g++ -x c++ ./common/files/hello.cpp -o "$OUTPUTPROG"
"$OUTPUTPROG" | grep -q "Hello!"
r_checkExitStatus $?
rm "$OUTPUTPROG"