From 4573fe69ed8aad3ef885be1abaa2f85a7f5a8186 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Fri, 1 Mar 2024 00:09:25 -0800 Subject: [PATCH] Less warnings --- ext/faiss/extconf.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/faiss/extconf.rb b/ext/faiss/extconf.rb index e2bf395..e4f9ab2 100644 --- a/ext/faiss/extconf.rb +++ b/ext/faiss/extconf.rb @@ -18,6 +18,10 @@ numo = File.join(Gem.loaded_specs["numo-narray"].require_path, "numo") abort "Numo not found" unless find_header("numo/narray.h", numo) +apple_clang = RbConfig::CONFIG["CC_VERSION_MESSAGE"] =~ /apple clang/i +$CXXFLAGS << " -Xclang" if apple_clang +$CXXFLAGS << " -fopenmp" + # for https://bugs.ruby-lang.org/issues/19005 $LDFLAGS += " -Wl,-undefined,dynamic_lookup" if RbConfig::CONFIG["host_os"] =~ /darwin/i