Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ end

windows_flag = Sys.iswindows()
apple_flag = Sys.isapple()
apple_silicon_flag = apple_flag && Sys.ARCH === :aarch64
file_extension = nothing
obj_files = []
ignore_jll = read_env("ODEINTERFACE_IGNORE_JLL") != nothing
Expand Down Expand Up @@ -440,14 +441,14 @@ if build_script != nothing
create_build_script()
else
# to build or not-to-build?
if VERSION >= v"1.3" && !ignore_jll
if VERSION >= v"1.3" && !ignore_jll && !apple_silicon_flag
# Julia supports Artifacts and we don't build anything and we try
# to use ODEInterface_jll
exit()
else
# either Julia version before v1.3 or we were asked to ignore
# ODEInterface_jll
# => in both cases we try to build:
# either Julia version is older than v1.3, we were asked to ignore
# ODEInterface_jll or we are on AppleSilicon
# => in all cases we try to build:
adapt_to_os()
build_with_gfortran()
end
Expand Down
3 changes: 2 additions & 1 deletion src/DLSolvers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ function loadODESolvers(extrapaths::Vector=AbstractString[],
if isempty(extrapaths)
extrapaths = [ @__DIR__ ]
end
use_jll = VERSION >= v"1.3" && !ignore_jll
apple_silicon = Sys.isapple() && Sys.ARCH === :aarch64
use_jll = VERSION >= v"1.3" && !ignore_jll && !apple_silicon
if use_jll
@eval ODEInterface begin
using ODEInterface_jll
Expand Down
1 change: 1 addition & 0 deletions src/ODEInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ function __init__()
# at this stage dlSolversInfo should be empty, but
# just to be sure
empty!(dlSolversInfo)
loadODESolvers()
end


Expand Down