Skip to content

Commit

Permalink
Initialize libAMGX only if AMGX_jll.libamgxsh is available (#24)
Browse files Browse the repository at this point in the history
* initialize libAMGX only if it's available

* bump patch release
  • Loading branch information
navidcy authored Nov 15, 2022
1 parent aa3cd21 commit 0b27723
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AMGX"
uuid = "c963dde9-0319-47f5-bf0c-b07d3c80ffa6"
authors = ["Julia Computing"]
version = "0.1.2"
version = "0.1.3"

[deps]
AMGX_jll = "656d14af-56e4-5275-8e68-4e861d7b5043"
Expand Down
12 changes: 7 additions & 5 deletions src/AMGX.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ libAMGX = ""
set_libAMGX_path(s::String) = (global libAMGX = s)

function __init__()
amgx_dir = get(ENV, "JULIA_AMGX_PATH", nothing)
if amgx_dir !== nothing
set_libAMGX_path(amgx_dir)
else
set_libAMGX_path(AMGX_jll.libamgxsh)
if AMGX.AMGX_jll.is_available()
amgx_dir = get(ENV, "JULIA_AMGX_PATH", nothing)
if amgx_dir !== nothing
set_libAMGX_path(amgx_dir)
else
set_libAMGX_path(AMGX_jll.libamgxsh)
end
end
end

Expand Down

2 comments on commit 0b27723

@KristofferC
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/72226

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.3 -m "<description of version>" 0b277233459c8535670fe635cdafa29da595d155
git push origin v0.1.3

Please sign in to comment.