diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2019-02-14 17:35:41 +0100 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2019-02-14 08:35:41 -0800 |
commit | 1ec0d4feb3b276950741f4f087660bda19e6695a (patch) | |
tree | aa138fccb9c7e711afa6cb1629b06b039675e06f /lib/spack/env | |
parent | b3dd95bd6241444184f763f4543b7ba864cdc1cb (diff) | |
download | spack-1ec0d4feb3b276950741f4f087660bda19e6695a.tar.gz spack-1ec0d4feb3b276950741f4f087660bda19e6695a.tar.bz2 spack-1ec0d4feb3b276950741f4f087660bda19e6695a.tar.xz spack-1ec0d4feb3b276950741f4f087660bda19e6695a.zip |
Removed pkg.headers.directories from the include list (#10604)
fixes #10601
Due to a bug this attribute is wrong for packages that use directories
as namespaces. For instance it will add "<boost-prefix>/include/boost"
instead of "<boost-prefix>/include" to the include path.
As a minor addition a few loops in the compiler wrappers have been
simplified.
Diffstat (limited to 'lib/spack/env')
-rwxr-xr-x | lib/spack/env/cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc index da1fee8756..3354448765 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -385,26 +385,24 @@ esac # Prepend include directories IFS=':' read -ra include_dirs <<< "$SPACK_INCLUDE_DIRS" if [[ $mode == cpp || $mode == cc || $mode == as || $mode == ccld ]]; then - for include_dir in "${include_dirs[@]}"; do - includes=("${includes[@]}" "$include_dir") - done + includes=("${includes[@]}" "${include_dirs[@]}") fi IFS=':' read -ra rpath_dirs <<< "$SPACK_RPATH_DIRS" if [[ $mode == ccld || $mode == ld ]]; then - for rpath_dir in "${rpath_dirs[@]}"; do + + if [[ "$add_rpaths" != "false" ]] ; then # Append RPATH directories. Note that in the case of the # top-level package these directories may not exist yet. For dependencies # it is assumed that paths have already been confirmed. - $add_rpaths && rpaths=("${rpaths[@]}" "$rpath_dir") - done + rpaths=("${rpaths[@]}" "${rpath_dirs[@]}") + fi + fi IFS=':' read -ra link_dirs <<< "$SPACK_LINK_DIRS" if [[ $mode == ccld || $mode == ld ]]; then - for link_dir in "${link_dirs[@]}"; do - libdirs=("${libdirs[@]}" "$link_dir") - done + libdirs=("${libdirs[@]}" "${link_dirs[@]}") fi # add RPATHs if we're in in any linking mode |