tUpdate NetCDF check for Julia 0.7 - Granular.jl - Julia package for granular dynamics simulation
 (HTM) git clone git://src.adamsgaard.dk/Granular.jl
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 74f158dc8f9d09abb7dd3aca469d24ddb4838c86
 (DIR) parent 991d22e7dd06c0103c2c0f9defe17ba73febf038
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Wed,  6 Jun 2018 13:11:34 -0400
       
       Update NetCDF check for Julia 0.7
       
       Diffstat:
         M src/ocean.jl                        |      22 +++++++++++++---------
       
       1 file changed, 13 insertions(+), 9 deletions(-)
       ---
 (DIR) diff --git a/src/ocean.jl b/src/ocean.jl
       t@@ -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