fftw: fix build with clang15+ (#38889)
In Clang 15, -Wint-conversion became an error instead of a warning, breaking the fftw build for clang versions > 15. This patch fixes fftw builds with clang 15+ by passing -Wno-error=int-conversion as a cflag.
This commit is contained in:
parent
ffc283ab8b
commit
9a05dce3bf
@ -63,6 +63,13 @@ def libs(self):
|
|||||||
|
|
||||||
return find_libraries(libraries, root=self.prefix, recursive=True)
|
return find_libraries(libraries, root=self.prefix, recursive=True)
|
||||||
|
|
||||||
|
def flag_handler(self, name, flags):
|
||||||
|
if name == "cflags":
|
||||||
|
if self.spec.satisfies("%clang@15:"):
|
||||||
|
flags.append("-Wno-error=int-conversion")
|
||||||
|
|
||||||
|
return flags, None, None
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
# If fftw/config.h exists in the source tree, it will take precedence
|
# If fftw/config.h exists in the source tree, it will take precedence
|
||||||
# over the copy in build dir. As only the latter has proper config
|
# over the copy in build dir. As only the latter has proper config
|
||||||
|
Loading…
Reference in New Issue
Block a user