Skip to content

Commit

Permalink
handle non-loadable system
Browse files Browse the repository at this point in the history
  • Loading branch information
shipengcheng1230 committed Dec 27, 2019
1 parent cc709c7 commit 3565be9
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/GmshTools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@ module GmshTools
using MLStyle

const depsjl_path = joinpath(@__DIR__, "..", "deps", "deps.jl")
if !isfile(depsjl_path)
error("libgmsh not installed properly, run Pkg.build(\"GmshTools\"), restart Julia and try again")
end
include(depsjl_path)

gmshmodule = joinpath(dirname(libgmsh), "gmsh.jl")
include(gmshmodule)

function __init__()
check_deps()
try
include(depsjl_path)
gmshmodule = joinpath(dirname(libgmsh), "gmsh.jl")
include(gmshmodule)
Base.invokelatest(check_deps) # world age problem
catch ex
if isa(ex, ErrorException)
@error "libgmsh not installed properly. Please check *.travis* for additional dependencies and rebuild this package."
else
rethrow(ex)
end
end
end

export gmsh, @gmsh_do, @gmsh_open
Expand Down

2 comments on commit 3565be9

@shipengcheng1230
Copy link
Owner Author

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 updated: JuliaRegistries/General/7180

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 Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.0 -m "<description of version>" 3565be95ee73418bd50463c9edc2a28424e5d9f9
git push origin v0.3.0

Please sign in to comment.