-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from dss-extensions/dss_capi-0.14.0
DSS C-API 0.14 and updated tests
- Loading branch information
Showing
17 changed files
with
1,035 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "OpenDSSDirect" | ||
uuid = "a8b11937-1041-50f2-9818-136bb7a8fb06" | ||
authors = ["Tom Short <[email protected]>"] | ||
version = "0.9.5" | ||
version = "0.9.6" | ||
|
||
[deps] | ||
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,27 @@ | ||
using Clang | ||
using Clang.Generators | ||
|
||
# LIBCLANG_HEADERS are those headers to be wrapped. | ||
const LIBOPENDSS_INCLUDE = [ | ||
joinpath(@__DIR__, "../../dss_capi/include/v7/") |> normpath, | ||
] | ||
error("This is broken for modern versions, but should be fixed when DSS C-API v1.0 is released.") | ||
|
||
const LIBOPENDSS_INCLUDE = joinpath(@__DIR__, "../../dss_capi/include/") |> normpath | ||
|
||
const LIBOPENDSS_HEADERS = String[] | ||
|
||
for folder in LIBOPENDSS_INCLUDE | ||
for header in readdir(folder) | ||
if endswith(header, ".h") | ||
push!(LIBOPENDSS_HEADERS, joinpath(folder, header)) | ||
end | ||
end | ||
end | ||
push!(LIBOPENDSS_HEADERS, joinpath(LIBOPENDSS_INCLUDE, "dss_capi.h")) | ||
push!(LIBOPENDSS_HEADERS, joinpath(LIBOPENDSS_INCLUDE, "dss_capi_ctx.h")) | ||
|
||
# for header in readdir(folder) | ||
# if endswith(header, ".h") | ||
# push!(LIBOPENDSS_HEADERS, joinpath(LIBOPENDSS_INCLUDE, header)) | ||
# end | ||
# end | ||
|
||
LIBOPENDSS_ARGS = get_default_args() | ||
|
||
LIBOPENDSS_ARGS = String[] | ||
for path in LIBOPENDSS_INCLUDE | ||
push!(LIBOPENDSS_ARGS, "-I") | ||
push!(LIBOPENDSS_ARGS, path) | ||
push!(LIBOPENDSS_ARGS, "-I$path") | ||
end | ||
|
||
|
||
wc = init(; headers = LIBOPENDSS_HEADERS, | ||
output_file = joinpath(@__DIR__, "../src/lib.jl"), | ||
common_file = joinpath(@__DIR__, "../src/common.jl"), | ||
clang_includes = vcat(LIBOPENDSS_INCLUDE..., CLANG_INCLUDE), | ||
clang_args = LIBOPENDSS_ARGS, | ||
header_wrapped = (root, current)->root == current, | ||
header_library = x->"LIBRARY", | ||
clang_diagnostics = true, | ||
) | ||
|
||
run(wc) | ||
options = load_options(joinpath(@__DIR__, "generator.toml")) | ||
ctx = create_context(LIBOPENDSS_HEADERS, LIBOPENDSS_ARGS, options) | ||
build!(ctx) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[general] | ||
library_name = "libdss_capi" | ||
output_file_path = "../src/lib.jl" | ||
module_name = "lib" | ||
jll_pkg_name = "OpenDSSDirect" | ||
export_symbol_prefixes = [""] | ||
use_julia_native_enum_type = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
fc8918d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
fc8918d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/101129
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
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 the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: