spack/var/spack/repos/builtin/packages/hdf5
Paul Henning 620836a809
hdf5: Fix compiler identification for warning flags (#24627)
* Fix compiler test

Use `self.spec.satisfies` on compiler to determine if a flag should be
applied or not.  This approach avoids issues with the strings `gcc`
or `clang` appearing in the full path to the compiler executables, as
happens with spack-installed compilers (e.g. `nvhpc%gcc`).

* Limit compiler name search to last path component

@skosukhin pointed out that the cflag modification should happen for any
clang or gcc compiler, regardless of what compiler spec provides them.
This commit reverts to searching for a compiler name containing "gcc"
or "clang", but limits the search to the last path component, which
avoids matching spack-installed compilers built with gcc (e.g.
`nvhpc%gcc`), which will have "gcc" in the compiler path.

* Use `os.path` rather than `pathlib`

Co-authored-by: Paul Henning <phenning@lanl.gov>
2021-07-08 15:17:44 -04:00
..
test
h5f90global-mult-obj-same-equivalence-same-common-block.patch
h5public-skip-mpicxx.patch
hdf5_1.8_gcc10.patch
package.py hdf5: Fix compiler identification for warning flags (#24627) 2021-07-08 15:17:44 -04:00
pre-c99-comments.patch