Skip to content

Commit

Permalink
Fix order
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan committed Oct 3, 2017
1 parent 8b36727 commit 2112580
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +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")
if 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"
elseif isfile(settings)
provider = readchomp(settings)
else
provider = ""
provider = "FFTW"
open(f -> println(f, provider), settings, "w")
end
if provider == "MKL" && Base.BLAS.vendor() === :mkl
mklpath = Libdl.dlpath("libmkl_rt")
Expand All @@ -30,7 +28,8 @@ if provider == "MKL" && Base.BLAS.vendor() === :mkl
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\").")
"To fix this, set ENV[\"JULIA_FFTW_PROVIDER\"] = \"FFTW\" and \n",
"rerun Pkg.build(\"FFTW\").")
else
include("build_fftw.jl")
end

0 comments on commit 2112580

Please sign in to comment.