summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorFrank Willmore <frankwillmore@gmail.com>2021-08-02 13:13:32 -0500
committerGitHub <noreply@github.com>2021-08-02 11:13:32 -0700
commit0df067e64f921d960be70db54a4b8f6727b32a52 (patch)
tree16887ae143aa32b527a9ade7385c7766f67bd4be /var
parent413ea10e78bba6fd2517404e4290afcd7b381694 (diff)
downloadspack-0df067e64f921d960be70db54a4b8f6727b32a52.tar.gz
spack-0df067e64f921d960be70db54a4b8f6727b32a52.tar.bz2
spack-0df067e64f921d960be70db54a4b8f6727b32a52.tar.xz
spack-0df067e64f921d960be70db54a4b8f6727b32a52.zip
adjust for erroneous detection of nvc as gcc (#24915)
* adjust for erroneous detection of nvc as gcc adjust for erroneous detection of nvc as gcc when it is built with gcc * add missing parenthesis :/ * fix trailing whitespace * re-work hdf5 patch for nvc to make it more general * flake8 fixes * Render as comment Render intended note as a comment rather than logical constraint Co-authored-by: Frank Willmore <willmore@anl.gov>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index f110700efb..e188bb94b1 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -188,11 +188,12 @@ class Hdf5(CMakePackage):
cmake_flags = []
if name == "cflags":
- cc_name = os.path.basename(self.compiler.cc)
- if "clang" in cc_name or "gcc" in cc_name:
+ if self.spec.satisfies('%gcc') \
+ or self.spec.satisfies('%clang'):
# Quiet warnings/errors about implicit declaration of functions
# in C99:
cmake_flags.append("-Wno-implicit-function-declaration")
+ # Note that this flag will cause an error if building %nvhpc.
if self.spec.satisfies('@:1.8.12~shared'):
# More recent versions set CMAKE_POSITION_INDEPENDENT_CODE to
# True and build with PIC flags.