Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update wrapper generator to Clang.jl master #119

Merged
merged 2 commits into from
Aug 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions gen/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[deps]
Clang = "40e3b903-d033-50b4-a0cc-940c62c95e31"
Clp_jll = "06985876-5285-5a41-9fcb-8948a742cc53"

[compat]
Clang = "0.14.0"
23 changes: 23 additions & 0 deletions gen/generate.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Clang.Generators
using Clp_jll

cd(@__DIR__)

clp_include_dir = joinpath(Clp_jll.artifact_dir, "include") |> normpath

coin_include_dir = joinpath(Clp_jll.CoinUtils_jll.artifact_dir, "include", "coin") |>normpath

options = load_options(joinpath(@__DIR__, "generate.toml"))

args = get_default_args()
push!(args, "-I$clp_include_dir", "-I$coin_include_dir")

headers = [
joinpath(clp_include_dir, "coin", "Clp_C_Interface.h")
joinpath(coin_include_dir, "Coin_C_defines.h")
]

ctx = create_context(headers, args, options)


build!(ctx)
23 changes: 23 additions & 0 deletions gen/generate.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[general]
library_name = "libClp"
output_file_path = "../lib/libClp.jl"
# module_name = "libclp"
odow marked this conversation as resolved.
Show resolved Hide resolved
# jll_pkg_name = "Clp_jll"
# prologue_file_path = "prologue.jl"
# epilogue_file_path = "epilogue.jl"
use_julia_native_enum_type = false
print_using_CEnum = false
use_deterministic_symbol = true
is_local_header_only = true
smart_de_anonymize = true
printer_blacklist = []
extract_c_comment_style = "doxygen"
# export_symbol_prefixes = ["Clp"]
[codegen]
use_julia_bool = true
always_NUL_terminated_string = true
is_function_strictly_typed = false
opaque_func_arg_as_PtrCvoid = false
opaque_as_mutable_struct = true
# use_ccall_macro = true
# wrap_variadic_function = true
Loading