Skip to content

Commit 553047b

Browse files
authored
Refactor version check for public Optimizer
Moved version check for public Optimizer to a static block.
1 parent 0e1c582 commit 553047b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/SCIP.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ import LinearAlgebra
99
import MathOptInterface as MOI
1010
import OpenBLAS32_jll
1111

12-
# Use version aware for public while Julia 1.10 is supported.
13-
VERSION >= v"1.11.0-DEV.469" && eval(Meta.parse("public Optimizer"))
14-
1512
# assorted utility functions
1613
include("util.jl")
1714

@@ -49,4 +46,10 @@ include("compat.jl")
4946

5047
# Event handler
5148
include("event_handler.jl")
49+
50+
# Use version aware for public while Julia 1.10 is supported.
51+
@static if VERSION >= v"1.11.0-DEV.469"
52+
eval(Meta.parse("public Optimizer"))
53+
end
54+
5255
end

0 commit comments

Comments
 (0)