Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: v12 Nonlinear #575

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,8 @@ function write_depsfile(path)
return
end

const ALIASES = [
"gurobi110",
"gurobi100",
"gurobi95",
"gurobi91",
"gurobi90"
]
const ALIASES =
["gurobi120", "gurobi110", "gurobi100", "gurobi95", "gurobi91", "gurobi90"]

function _try_local_install()
paths_to_try = copy(ALIASES)
Expand Down
4 changes: 2 additions & 2 deletions scripts/gen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

using Clang.Generators

const gurobi_c = "/Library/gurobi1100/macos_universal2/include/gurobi_c.h"
const output_folder = "gen110"
const gurobi_c = "/Library/gurobi1200/macos_universal2/include/gurobi_c.h"
const output_folder = "gen120"

options = load_options(joinpath(@__DIR__, "generate.toml"))
options["general"]["output_file_path"] =
Expand Down
1 change: 1 addition & 0 deletions scripts/generate.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ output_ignorelist = [
opaque_as_mutable_struct = false

[codegen.macro]
macro_mode = "aggressive"
ignore_header_guards_with_suffixes = ["__stdcall"]
39 changes: 23 additions & 16 deletions src/Gurobi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ else
(:GRBversion, libgurobi),
Cvoid,
(Ptr{Cint}, Ptr{Cint}, Ptr{Cint}),
majorP, minorP, technicalP,
majorP,
minorP,
technicalP,
)
VersionNumber(majorP[], minorP[], technicalP[])
end
Expand All @@ -57,32 +59,37 @@ elseif _is_patch(_GUROBI_VERSION, v"10.0")
include("gen100/libgrb_api.jl")
elseif _is_patch(_GUROBI_VERSION, v"11.0")
include("gen110/libgrb_api.jl")
elseif _is_patch(_GUROBI_VERSION, v"12.0")
include("gen120/libgrb_api.jl")
else
error("""
You have installed version $_GUROBI_VERSION of Gurobi, which is not
supported by Gurobi.jl. We require Gurobi version 9.0 or 9.1 or 9.5
or 10.0 or 11.0.
error(
"""
You have installed version $_GUROBI_VERSION of Gurobi, which is not
supported by Gurobi.jl. We require Gurobi version 9.0 or 9.1 or 9.5
or 10.0 or 11.0 or 12.0.

After installing a supported version of Gurobi, run:
After installing a supported version of Gurobi, run:

import Pkg
Pkg.rm("Gurobi")
Pkg.add("Gurobi")
import Pkg
Pkg.rm("Gurobi")
Pkg.add("Gurobi")

Make sure you set the environment variable `GUROBI_HOME` following
the instructions in the Gurobi.jl README, which is available at
https://github.com/jump-dev/Gurobi.jl.
Make sure you set the environment variable `GUROBI_HOME` following
the instructions in the Gurobi.jl README, which is available at
https://github.com/jump-dev/Gurobi.jl.

If you have a newer version of Gurobi installed, changes may need to be made
to the Julia code. Please open an issue at
https://github.com/jump-dev/Gurobi.jl.
""")
If you have a newer version of Gurobi installed, changes may need to be made
to the Julia code. Please open an issue at
https://github.com/jump-dev/Gurobi.jl.
""",
)
end

include("MOI_wrapper/MOI_wrapper.jl")
include("MOI_wrapper/MOI_callbacks.jl")
include("MOI_wrapper/MOI_multi_objective.jl")
include("MOI_wrapper/MOI_indicator_constraint.jl")
include("MOI_wrapper/MOI_nonlinear.jl")

# Gurobi exports all `GRBXXX` symbols. If you don't want all of these symbols in
# your environment, then use `import Gurobi` instead of `using Gurobi`.
Expand Down
Loading
Loading