Granular.jl

Julia package for granular dynamics simulation
git clone git://src.adamsgaard.dk/Granular.jl
Log | Files | Refs | README | LICENSE

commit 74f158dc8f9d09abb7dd3aca469d24ddb4838c86
parent 991d22e7dd06c0103c2c0f9defe17ba73febf038
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed,  6 Jun 2018 13:11:34 -0400

Update NetCDF check for Julia 0.7

Diffstat:
Msrc/ocean.jl | 22+++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/ocean.jl b/src/ocean.jl @@ -3,16 +3,20 @@ using Compat.Test using Compat.LinearAlgebra hasNetCDF = false -if typeof(Compat.Pkg.installed("NetCDF")) == VersionNumber - import NetCDF - hasNetCDF = true -else - if !hasNetCDF - Compat.@warn "Package NetCDF not found. " * - "Ocean/atmosphere grid read not supported. " * - "Please install NetCDF and its " * - "requirements with `Pkg.add(\"NetCDF\")`." +if VERSION < v"0.7.0-alpha" + if typeof(Compat.Pkg.installed("NetCDF")) == VersionNumber + import NetCDF + hasNetCDF = true end +elseif haskey(Pkg.installed(), "NetCDF") + import NetCDF + hasNetCDF = true +end +if !hasNetCDF + Compat.@warn "Package NetCDF not found. " * + "Ocean/atmosphere grid read not supported. " * + "Please install NetCDF and its " * + "requirements with `Pkg.add(\"NetCDF\")`." end export createEmptyOcean