ext/torch/extconf.rb in torch-rb-0.3.0 vs ext/torch/extconf.rb in torch-rb-0.3.1

- old
+ new

@@ -5,20 +5,19 @@ $CXXFLAGS += " -std=c++14" # change to 0 for Linux pre-cxx11 ABI version $CXXFLAGS += " -D_GLIBCXX_USE_CXX11_ABI=1" -# TODO check compiler name -clang = RbConfig::CONFIG["host_os"] =~ /darwin/i +apple_clang = RbConfig::CONFIG["CC_VERSION_MESSAGE"] =~ /apple clang/i # check omp first if have_library("omp") || have_library("gomp") $CXXFLAGS += " -DAT_PARALLEL_OPENMP=1" - $CXXFLAGS += " -Xclang" if clang + $CXXFLAGS += " -Xclang" if apple_clang $CXXFLAGS += " -fopenmp" end -if clang +if apple_clang # silence ruby/intern.h warning $CXXFLAGS += " -Wno-deprecated-register" # silence torch warnings $CXXFLAGS += " -Wno-shorten-64-to-32 -Wno-missing-noreturn"