Extended set of environment modification commands. (#8996)

This commit is contained in:
Sergey Kosukhin
2018-09-05 19:56:45 +02:00
committed by becker33
parent 501669faba
commit f9617b2ad8
5 changed files with 217 additions and 88 deletions

12
lib/spack/env/cc vendored
View File

@@ -202,18 +202,6 @@ if [[ -z $command ]]; then
die "ERROR: Compiler '$SPACK_COMPILER_SPEC' does not support compiling $language programs."
fi
#
# Set paths as defined in the 'environment' section of the compiler config
# names are stored in SPACK_ENV_TO_SET
# values are stored in SPACK_ENV_SET_<varname>
#
IFS=':' read -ra env_set_varnames <<< "$SPACK_ENV_TO_SET"
for varname in "${env_set_varnames[@]}"; do
spack_varname="SPACK_ENV_SET_$varname"
export "$varname"="${!spack_varname}"
unset "$spack_varname"
done
#
# Filter '.' and Spack environment directories out of PATH so that
# this script doesn't just call itself