diff --git a/config/common/supportedGencodes.sh b/config/common/supportedGencodes.sh index 8544d1e12bbcbb10dd3b88b05c479415ba1480c2..63766cca1f26382710ce4d562b52e26745e23280 100755 --- a/config/common/supportedGencodes.sh +++ b/config/common/supportedGencodes.sh @@ -1,37 +1,23 @@ #!/bin/sh # # Returns a string with allowed -gencode value pairs -# for the CUDA version given by a string that defines -# where the CUDA installation resides. If the user -# allows it can also return a "default" set of value -# pairs that should give "something" for CUDA versions -# 5.5--8.0. -# +# for the given CUDA version. If the user allows it +# can also return a "default" set of value pairs that +# should give "something" for CUDA versions 5.5--8.0. default_arch="-gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=sm_21 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35" -instring=$1 +vn=$1 default_allowed=$2 -if [ `echo $instring | grep cuda` ] -then - vn=`echo $instring | awk -F 'cuda-' '{print $2}'` - vn=`echo $vn | sed 's;/;;'` -elif [ `echo $instring | grep CUDA` ] -then - vn=`echo $instring | awk -F 'CUDA-' '{print $2}'` - vn=`echo $vn | sed 's;/;;'` -else - if [ "$default_allowed" = default_allowed ] - then +if [ "$default_allowed" = default_allowed ]; then echo $default_arch exit 0 - else +else exit 1 - fi fi -if [ "$vn" = 5.5 ] +if [ "$vn" = 5.5 ] then echo "-gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=sm_21 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35" exit 0 @@ -71,12 +57,4 @@ elif [ "$vn" = 10.0 ] then echo "-gencode arch=compute_30,code=sm_30 -gencode arch=compute_32,code=sm_32 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_72,code=sm_72 -gencode arch=compute_75,code=sm_75" exit 0 -else - if [ "$default_allowed" = default_allowed ] - then - echo $default_arch - exit 0 - else - exit 1 - fi fi diff --git a/config/common/vars.mk b/config/common/vars.mk index 90351e5e875aaa0a481d940972ca21d1ec23b340..c7e97701b8a7122b6f08d7c610ec1595cef765c6 100644 --- a/config/common/vars.mk +++ b/config/common/vars.mk @@ -51,10 +51,10 @@ INCFLAGS = ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR} # Final compiler/linker flags ############################# -# Honour any flags provided by the environment -CFLAGS ?= -CXXFLAGS ?= -LDFLAGS ?= +# Ignore flags provided by the environment +CFLAGS = +CXXFLAGS = +LDFLAGS = # All projects must use these flags for # compilation/linking, using the form: