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:
Aiden Grossman 2023-07-18 14:02:51 -07:00 committed by GitHub
parent ffc283ab8b
commit 9a05dce3bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,6 +63,13 @@ def libs(self):
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):
# 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