From 667834cfe5214523edd7769aeab77f91b7137686 Mon Sep 17 00:00:00 2001 From: JRPan <25518778+JRPan@users.noreply.github.com> Date: Mon, 7 Oct 2024 13:56:32 -0700 Subject: we have gcc-11 now. Check version for more than 2 digits. (#79) * we have gcc-11 now. Check version for more than 2 digits. * version detection as well - And support c++ 11 by default --- setup_environment | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'setup_environment') diff --git a/setup_environment b/setup_environment index 871bb59..3428101 100644 --- a/setup_environment +++ b/setup_environment @@ -44,7 +44,8 @@ if [ $? = 1 ]; then return 1; fi -CC_VERSION=`gcc --version | head -1 | awk '{for(i=1;i<=NF;i++){ if(match($i,/^[0-9]\.[0-9]\.[0-9]$/)) {print $i; exit 0}}}'` +CC_VERSION=$(gcc --version | head -1 | awk '{for(i=1;i<=NF;i++){ if(match($i,/^[0-9]+\.[0-9]+\.[0-9]+$/)) {print $i; exit 0}}}') + CUDA_VERSION_STRING=`$CUDA_INSTALL_PATH/bin/nvcc --version | awk '/release/ {print $5;}' | sed 's/,//'`; export CUDA_VERSION_NUMBER=`echo $CUDA_VERSION_STRING | sed 's/\./ /' | awk '{printf("%02u%02u", 10*int($1), 10*$2);}'` -- cgit v1.3