66* *
77* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *=#
88
9- import Pkg
10- Pkg. activate (@__DIR__ )
11- Pkg. instantiate ()
12-
139import Documenter
1410
1511# ==============================================================================
1612# Parse and build docstrings from the C API
1713# ==============================================================================
1814
19- const libhighs = " "
20- include (joinpath (@__DIR__ , " c_api_gen" , " build.jl" ))
21- include (joinpath (@__DIR__ , " c_api_gen" , " libhighs.jl" ))
15+ import Clang
16+
17+ let
18+ highs = joinpath (dirname (@__DIR__ ), " highs" )
19+ c_api = joinpath (highs, " interfaces" , " highs_c_api.h" )
20+ ctx = Clang. Generators. create_context (
21+ [c_api, joinpath (highs, " util" , " HighsInt.h" )],
22+ vcat (Clang. Generators. get_default_args (), " -I$highs " ),
23+ Dict (
24+ " general" => Dict (
25+ " library_name" => " libhighs" ,
26+ " output_file_path" => joinpath (@__DIR__ , " libhighs.jl" ),
27+ " print_using_CEnum" => false ,
28+ " extract_c_comment_style" => " doxygen" ,
29+ ),
30+ ),
31+ )
32+ Clang. Generators. build! (ctx)
33+ include (joinpath (@__DIR__ , " libhighs.jl" ))
34+ end
35+
36+ # Add a docstring for HighsInt
37+ @doc " HighsInt\n\n The constant `Cint`." HighsInt
2238
2339# ==============================================================================
2440# Make the documentation
@@ -33,16 +49,15 @@ Documenter.makedocs(
3349 prettyurls = get (ENV , " CI" , nothing ) == " true" ,
3450 highlights = [" yaml" ],
3551 ),
36- strict = ! (" strict=false" in ARGS ),
3752 doctest = (" doctest=only" in ARGS ) ? :only : true ,
3853 repo = " https://github.com/ERGO-Code/HiGHS/tree/latest{path}" ,
3954 linkcheck = false ,
4055 linkcheck_ignore = [
4156 " https://crates.io/crates/highs" ,
4257 " https://crates.io/crates/good_lp" ,
4358 " https://link.springer.com/article/10.1007/s12532-017-0130-5" ,
44- " https://link.springer.com/article/10.1007/s12532-020-00181-8" ,
45- " https://github.com/ERGO-Code/HiGHS/blob/master/highs/Highs.h"
59+ " https://link.springer.com/article/10.1007/s12532-020-00181-8" ,
60+ " https://github.com/ERGO-Code/HiGHS/blob/master/highs/Highs.h"
4661 ],
4762 pages = [
4863 " About" => " index.md" ,
0 commit comments