Skip to content

Commit c1b065b

Browse files
committed
Add back generator.toml as a common config file
1 parent 99a3bc0 commit c1b065b

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

gen/generate.jl

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,12 @@ curl_h = joinpath(include_dir, "curl", "curl.h")
1616
# mprintf_h = joinpath(include_dir, "curl", "mprintf.h")
1717
# stdcheaders_h = joinpath(include_dir, "curl", "stdcheaders.h")
1818

19+
options = load_options(joinpath(@__DIR__, "generator.toml"))
20+
1921
for target in JLLEnvs.JLL_ENV_TRIPLES
2022
@info "processing $target"
2123

22-
# programmatically add options
23-
options = Dict{String,Any}("general" => Dict{String,Any}())
24-
general = options["general"]
25-
general["library_name"] = "libcurl"
26-
general["output_file_path"] = joinpath(@__DIR__, "..", "lib", "$target.jl")
27-
general["use_julia_native_enum_type"] = true
28-
general["auto_mutability"] = true
29-
general["use_deterministic_symbol"] = true
30-
general["printer_blacklist"] = [
31-
"CURL_SUFFIX_CURL_OFF_T",
32-
"CURL_SUFFIX_CURL_OFF_TU",
33-
"CURL_ZERO_TERMINATED",
34-
]
24+
options["general"]["output_file_path"] = joinpath(@__DIR__, "..", "lib", "$target.jl")
3525

3626
args = get_default_args(target)
3727
push!(args, "-I$include_dir")

gen/generator.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[general]
2+
library_name = "libcurl"
3+
use_julia_native_enum_type = true
4+
use_deterministic_symbol = true
5+
auto_mutability = true
6+
7+
printer_blacklist = [
8+
"CURL_SUFFIX_CURL_OFF_T",
9+
"CURL_SUFFIX_CURL_OFF_TU",
10+
"CURL_ZERO_TERMINATED",
11+
]
12+
13+
[codegen.macro]
14+
macro_mode = "basic"

0 commit comments

Comments
 (0)