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
@ -188,11 +188,12 @@ def flag_handler(self, name, flags):
|
|||||||
cmake_flags = []
|
cmake_flags = []
|
||||||
|
|
||||||
if name == "cflags":
|
if name == "cflags":
|
||||||
cc_name = os.path.basename(self.compiler.cc)
|
if self.spec.satisfies('%gcc') \
|
||||||
if "clang" in cc_name or "gcc" in cc_name:
|
or self.spec.satisfies('%clang'):
|
||||||
# Quiet warnings/errors about implicit declaration of functions
|
# Quiet warnings/errors about implicit declaration of functions
|
||||||
# in C99:
|
# in C99:
|
||||||
cmake_flags.append("-Wno-implicit-function-declaration")
|
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'):
|
if self.spec.satisfies('@:1.8.12~shared'):
|
||||||
# More recent versions set CMAKE_POSITION_INDEPENDENT_CODE to
|
# More recent versions set CMAKE_POSITION_INDEPENDENT_CODE to
|
||||||
# True and build with PIC flags.
|
# True and build with PIC flags.
|
||||||
|
Loading…
Reference in New Issue
Block a user