11using  Clang
22
3- header_path  =  " /usr/include/scip " 
4- all_headers  =  readdir (header_path) 
5- 
3+ HEADER_BASE  =  " /usr/include"   #  using system-wide installation of SCIP 
4+ HEADER_DIR  =  " scip " 
5+ all_headers  =   readdir ( joinpath (HEADER_BASE, HEADER_DIR)) 
66top_types =  [
77    " type_retcode.h"  ,
88    " type_result.h"  ,
@@ -18,27 +18,21 @@ top_types = [
1818    " type_tree.h"  ,
1919    " type_scip.h"  ,
2020]
21- 
2221headers =  vcat (
2322    top_types,
2423    filter (h ->  startswith (h, " type_"  ) &&  ! in (h, top_types), all_headers),
2524    #  filter(h -> startswith(h, "pub_"), all_headers),
2625    filter (h ->  startswith (h, " scip_"  ), all_headers),
2726)
28- clang_includes =  [
29-     " /usr/lib/llvm-6.0/lib/clang/6.0.0/include"  ,
30- ]
3127
32- context =  Clang. wrap_c. init (
33-     #  header files we want wrapped
34-     headers= [joinpath (header_path, h) for  h in  headers],
28+ context =  Clang. init (
29+     headers= [joinpath (HEADER_BASE, HEADER_DIR, h) for  h in  headers],
3530    common_file= " commons.jl"  ,
3631    output_dir= " ../src/wrapper"  ,
37-     clang_includes= clang_includes,
32+     clang_includes= vcat (HEADER_BASE, LLVM_INCLUDE),
33+     clang_args =  [" -I"  , HEADER_BASE],
3834    clang_diagnostics= true ,
39-     #  do not wrap included headers
4035    header_wrapped= (header, cursorname) ->  header ==  cursorname,
4136    header_library= header_name ->  " libscip" 
4237)
43- 
4438Clang. run (context)
0 commit comments