diff --git a/deps/build.jl b/deps/build.jl index 728b871..1efb5ad 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -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") @@ -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