Add README and code generation scripts

This commit is contained in:
2019-08-07 12:57:53 -05:00
parent 04f844d61a
commit 5367bebc01
3 changed files with 79 additions and 1 deletions

20
gen/generate.jl Executable file
View File

@@ -0,0 +1,20 @@
using Clang
if "CPLEX_INCLUDE_DIR" keys(ENV)
error("CPLEX_INCLUDE_DIR must be defined")
end
CPLEX_INCLUDE_DIR = ENV["CPLEX_INCLUDE_DIR"]
mkpath("output")
context = Clang.init(
headers=["$CPLEX_INCLUDE_DIR/cpxconst.h", "$CPLEX_INCLUDE_DIR/cplex.h"],
common_file="commons.jl",
output_dir="output",
clang_includes=vcat(CPLEX_INCLUDE_DIR, LLVM_INCLUDE),
clang_args = ["-I", CPLEX_INCLUDE_DIR],
clang_diagnostics=true,
header_wrapped=(header, cursorname) -> header == cursorname,
header_library=header_name -> "libcplex"
)
Clang.run(context)