From 8b36727492f54f45195ed8b9fc4bc61c9c7f3b68 Mon Sep 17 00:00:00 2001 From: Alex Arslan Date: Sun, 1 Oct 2017 18:56:23 -0700 Subject: [PATCH] Error if MKL requested for non-MKL Julia --- deps/build.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deps/build.jl b/deps/build.jl index 7a9cf47..728b871 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -2,11 +2,14 @@ # In that case, we have to do this little dance to get around having to use BinDeps # for a library that's already linked to Julia. settings = joinpath(@__DIR__, "..", ".build_settings") +action = "" if isfile(settings) provider = readchomp(settings) + action = "delete " * normpath(settings) elseif haskey(ENV, "JULIA_FFTW_PROVIDER") provider = ENV["JULIA_FFTW_PROVIDER"] open(f -> println(f, provider), settings, "w") + action = "unset the JULIA_FFTW_PROVIDER environment variable" else provider = "" end @@ -25,6 +28,9 @@ if provider == "MKL" && Base.BLAS.vendor() === :mkl const libfftwf = "$mklpath" """) end +elseif provider == "MKL" + error("MKL build requested for FFTW but Julia was not built with MKL.\n", + "To fix this, " action, " and rerun Pkg.build(\"FFTW\").") else include("build_fftw.jl") end