Skip to content

Commit

Permalink
Julia 1.9+ extension system
Browse files Browse the repository at this point in the history
  • Loading branch information
ThummeTo committed Jun 17, 2024
1 parent b7d0fae commit fd4d880
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ FMIBase = "900ee838-d029-460e-b485-d98a826ceef2"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
RelocatableFolders = "05181044-ff0b-4ac5-8273-598c1e38db00"

[weakdeps]
FMIZoo = "724179cf-c260-40a9-bd27-cccc6fe2f195"

[extensions]
FMIZooExt = ["FMIZoo"]

[compat]
Downloads = "1"
FMIBase = "1.0.0"
Expand Down
15 changes: 15 additions & 0 deletions ext/FMIZooExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# Copyright (c) 2021 Frederic Bruder, Tobias Thummerer, Lars Mikelsons
# Licensed under the MIT license. See LICENSE file in the project root for details.
#

module FMIZooExt

using FMIImport, FMIZoo

function FMIImport.loadFMU(modelName::AbstractString, tool::AbstractString, version::AbstractString, fmiversion::AbstractString="2.0"; kwargs...)
fname = get_model_filename(modelName, tool, version, fmiversion)
return FMIImport.loadFMU(fname; kwargs...)
end

end # FMIZooExt

0 comments on commit fd4d880

Please sign in to comment.