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>
This commit is contained in:
parent
413ea10e78
commit
0df067e64f
1 changed files with 3 additions and 2 deletions
|
@ -188,11 +188,12 @@ def flag_handler(self, name, flags):
|
|||
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.
|
||||
|
|
Loading…
Reference in a new issue