Skip to content

Commit

Permalink
Error if MKL requested for non-MKL Julia
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan committed Oct 2, 2017
1 parent 37ba16e commit 8b36727
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 8b36727

Please sign in to comment.