@@ -12,14 +12,15 @@ import Clang: Generators
1212
1313highs_src = joinpath (dirname (dirname (@__DIR__ )), " src" )
1414c_api = joinpath (highs_src, " interfaces" , " highs_c_api.h" )
15+ libhighs_filename = joinpath (@__DIR__ , " libhighs.jl" )
1516
1617Generators. build! (
1718 Generators. create_context (
1819 [c_api, joinpath (highs_src, " util" , " HighsInt.h" )],
1920 [Generators. get_default_args (); " -I$highs_src " ; " -I$(@__DIR__ ) " ],
2021 Dict {String,Any} (
2122 " general" => Dict {String,Any} (
22- " output_file_path" => joinpath ( @__DIR__ , " libhighs.jl " ) ,
23+ " output_file_path" => libhighs_filename ,
2324 " library_name" => " libhighs" ,
2425 " print_using_CEnum" => false ,
2526 " extract_c_comment_style" => " doxygen" ,
@@ -28,7 +29,15 @@ Generators.build!(
2829 ),
2930)
3031
31- open (joinpath (@__DIR__ , " libhighs.jl" ), " a" ) do io
32+ write (
33+ libhighs_filename,
34+ replace (
35+ read (libhighs_filename, String),
36+ " [`HighsInt`](@ref)" => " `HighsInt`" ,
37+ ),
38+ )
39+
40+ open (libhighs_filename, " a" ) do io
3241 for line in readlines (c_api)
3342 m = match (r" const HighsInt kHighs([a-zA-Z]+) = (-?[0-9]+);" , line)
3443 if m === nothing
0 commit comments