diff options
Diffstat (limited to 'lib/spack/env/cc')
-rwxr-xr-x | lib/spack/env/cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 52fc8f524d..11b08f4752 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -174,18 +174,6 @@ preextend() { unset IFS } -# eval this because SPACK_MANAGED_DIRS and SPACK_SYSTEM_DIRS are inputs we don't wanna loop over. -# moving the eval inside the function would eval it every call. -eval "\ -path_order() { -case \"\$1\" in - $SPACK_MANAGED_DIRS) return 0 ;; - $SPACK_SYSTEM_DIRS) return 2 ;; - /*) return 1 ;; -esac -} -" - # Fail with a clear message if the input contains any bell characters. if eval "[ \"\${*#*${lsep}}\" != \"\$*\" ]"; then die "Compiler command line contains our separator ('${lsep}'). Cannot parse." @@ -198,6 +186,18 @@ for param in $params; do fi done +# eval this because SPACK_MANAGED_DIRS and SPACK_SYSTEM_DIRS are inputs we don't wanna loop over. +# moving the eval inside the function would eval it every call. +eval "\ +path_order() { +case \"\$1\" in + $SPACK_MANAGED_DIRS) return 0 ;; + $SPACK_SYSTEM_DIRS) return 2 ;; + /*) return 1 ;; +esac +} +" + # Check if optional parameters are defined # If we aren't asking for debug flags, don't add them if [ -z "${SPACK_ADD_DEBUG_FLAGS:-}" ]; then |