Skip to content

Commit

Permalink
Merge pull request #4 from GMLC-TDC/kd/update-helics-dependency
Browse files Browse the repository at this point in the history
Update to HELICS v2.0.0
  • Loading branch information
kdheepak authored Mar 11, 2019
2 parents b7e81c8 + e83c79a commit a1a308e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 21 deletions.
8 changes: 3 additions & 5 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ abstract type Windows <: AbstractOS end
abstract type MacOS <: BSD end
abstract type Linux <: BSD end

const HELICS_VERSION = "2.0.0rc1"

if Sys.iswindows()
const LIBRARY_EXT = "dll"
const DEPS = "windows"
Expand Down Expand Up @@ -65,7 +63,7 @@ function Base.download(::Type{MacOS})

mkpath(joinpath(@__DIR__, DEPS))

url = "https://anaconda.org/gmlc-tdc/helics/2.0.0rc1/download/osx-64/helics-2.0.0rc1-py37h0a44026_0.tar.bz2"
url = "https://anaconda.org/gmlc-tdc/helics/2.0.0/download/osx-64/helics-2.0.0-py37h0a44026_0.tar.bz2"
get_libraries(url, map(
x -> joinpath("lib", x),
["libhelicsSharedLib.dylib"]
Expand Down Expand Up @@ -101,7 +99,7 @@ function Base.download(::Type{Linux})

mkpath(joinpath(@__DIR__, DEPS))

url = "https://anaconda.org/gmlc-tdc/helics/2.0.0rc1/download/linux-64/helics-2.0.0rc1-py37hf484d3e_0.tar.bz2"
url = "https://anaconda.org/gmlc-tdc/helics/2.0.0/download/linux-64/helics-2.0.0-py37hf484d3e_0.tar.bz2"
get_libraries(url, map(
x -> joinpath("lib", x),
["libhelicsSharedLib.so"]
Expand Down Expand Up @@ -143,7 +141,7 @@ function Base.download(::Type{Windows})
BIT = "32"
end

url = "https://anaconda.org/gmlc-tdc/helics/2.0.0rc1/download/win-$BIT/helics-2.0.0rc1-py37h6538335_0.tar.bz2"
url = "https://anaconda.org/gmlc-tdc/helics/2.0.0/download/win-$BIT/helics-2.0.0-py37h6538335_0.tar.bz2"
get_libraries(url, ["Library/lib/helicsSharedLib.lib", "Library/bin/helicsSharedLib.dll"])

url = "https://anaconda.org/anaconda/libboost/1.67.0/download/win-$BIT/libboost-1.67.0-hd9e427e_4.tar.bz2"
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Clang

# LIBCLANG_HEADERS are those headers to be wrapped.
const LIBCLANG_INCLUDE = "/Users/$USER/local/helics-v2.0.0-beta.3/include/helics/shared_api_library" |> normpath
const LIBCLANG_INCLUDE = "/Users/$USER/local/helics-v2.0.0/include/helics/shared_api_library" |> normpath
const LIBCLANG_HEADERS = [joinpath(LIBCLANG_INCLUDE, header) for header in readdir(LIBCLANG_INCLUDE) if endswith(header, ".h")]

wc = init(; headers = LIBCLANG_HEADERS,
Expand Down
10 changes: 5 additions & 5 deletions src/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ end

const HELICS_HAVE_MPI = 0
const HELICS_HAVE_ZEROMQ = 1
const BOOST_VERSION_LEVEL = 68
const BOOST_VERSION_LEVEL = 67
const HELICS_VERSION_MAJOR = 2
const HELICS_VERSION_MINOR = 0
const HELICS_VERSION_PATCH = 0
const HELICS_VERSION = ".0.0-rc1"
const HELICS_VERSION_BUILD = "rc1"
const HELICS_VERSION_STRING = "2.0.0-rc1 (01-18-19)"
const HELICS_DATE = "01-18-19"
const HELICS_VERSION = "2.0.0"
const HELICS_VERSION_BUILD = ""
const HELICS_VERSION_STRING = "2.0.0 (03-10-19)"
const HELICS_DATE = "03-10-19"

@cenum(helics_data_type,
helics_data_type_string = 0,
Expand Down
18 changes: 9 additions & 9 deletions src/lib.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module Lib

include("common.jl")

# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0-rc1/include/helics/shared_api_library/MessageFederate.h
# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0/include/helics/shared_api_library/MessageFederate.h
# Automatically generated using Clang.jl wrap_c


Expand Down Expand Up @@ -120,7 +120,7 @@ module Lib
function helicsEndpointGetOption(_end, option)
ccall((:helicsEndpointGetOption, HELICS_LIBRARY), helics_bool, (helics_endpoint, Cint), _end, option)
end
# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0-rc1/include/helics/shared_api_library/MessageFilters.h
# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0/include/helics/shared_api_library/MessageFilters.h
# Automatically generated using Clang.jl wrap_c


Expand Down Expand Up @@ -207,7 +207,7 @@ module Lib
function helicsFilterGetOption(filt, option)
ccall((:helicsFilterGetOption, HELICS_LIBRARY), helics_bool, (helics_filter, Cint), filt, option)
end
# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0-rc1/include/helics/shared_api_library/ValueFederate.h
# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0/include/helics/shared_api_library/ValueFederate.h
# Automatically generated using Clang.jl wrap_c


Expand Down Expand Up @@ -490,13 +490,13 @@ module Lib
function helicsFederateGetInputCount(fed)
ccall((:helicsFederateGetInputCount, HELICS_LIBRARY), Cint, (helics_federate,), fed)
end
# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0-rc1/include/helics/shared_api_library/api-data.h
# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0/include/helics/shared_api_library/api-data.h
# Automatically generated using Clang.jl wrap_c

# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0-rc1/include/helics/shared_api_library/helics-config.h
# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0/include/helics/shared_api_library/helics-config.h
# Automatically generated using Clang.jl wrap_c

# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0-rc1/include/helics/shared_api_library/helics.h
# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0/include/helics/shared_api_library/helics.h
# Automatically generated using Clang.jl wrap_c


Expand Down Expand Up @@ -915,7 +915,7 @@ module Lib
function helicsCleanupLibrary()
ccall((:helicsCleanupLibrary, HELICS_LIBRARY), Cvoid, ())
end
# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0-rc1/include/helics/shared_api_library/helicsCallbacks.h
# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0/include/helics/shared_api_library/helicsCallbacks.h
# Automatically generated using Clang.jl wrap_c


Expand All @@ -930,10 +930,10 @@ module Lib
function helicsFederateAddLoggingCallback(fed, logger, err)
ccall((:helicsFederateAddLoggingCallback, HELICS_LIBRARY), Cvoid, (helics_federate, Ptr{Cvoid}, Ptr{helics_error}), fed, logger, err)
end
# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0-rc1/include/helics/shared_api_library/helics_enums.h
# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0/include/helics/shared_api_library/helics_enums.h
# Automatically generated using Clang.jl wrap_c

# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0-rc1/include/helics/shared_api_library/helics_export.h
# Julia wrapper for header: /Users/$USER/local/helics-v2.0.0/include/helics/shared_api_library/helics_export.h
# Automatically generated using Clang.jl wrap_c

end
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using Test
const h = HELICS

@test h.helicsGetVersion() isa String
@test h.helicsGetVersion() == "2.0.0-rc1 (01-18-19)"
@test h.helicsGetVersion() == "2.0.0 (03-10-19)"

include("valuefederate.jl")
include("messagefederate.jl")
Expand Down

0 comments on commit a1a308e

Please sign in to comment.