File tree Expand file tree Collapse file tree 1 file changed +15
-19
lines changed
Expand file tree Collapse file tree 1 file changed +15
-19
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,21 @@ has_knitro() = endswith(libknitro, Libdl.dlext)
1919
2020if isdefined (@__MODULE__ , :libknitro )
2121 # deps.jl must define a local installation.
22+ function __init__ ()
23+ libiomp5 = replace (libknitro, " libknitro" => " libiomp5" )
24+ if isfile (libiomp5)
25+ Libdl. dlopen (libiomp5)
26+ end
27+ version = has_knitro () ? knitro_version () : v " 0.0.0"
28+ if version != v " 0.0.0" && version < v " 11.0"
29+ error (
30+ " You have installed version $version of Artelys " *
31+ " Knitro, which is not supported by KNITRO.jl. We require a " *
32+ " Knitro version greater than 11.0." ,
33+ )
34+ end
35+ return
36+ end
2237elseif KNITRO_jll. is_available ()
2338 import KNITRO_jll: libknitro
2439else
2843 )
2944end
3045
31- function __init__ ()
32- if KNITRO_jll. is_available ()
33- return
34- end
35- libiomp5 = replace (libknitro, " libknitro" => " libiomp5" )
36- if isfile (libiomp5)
37- Libdl. dlopen (libiomp5)
38- end
39- version = has_knitro () ? knitro_version () : v " 0.0.0"
40- if version != v " 0.0.0" && version < v " 11.0"
41- error (
42- " You have installed version $version of Artelys " *
43- " Knitro, which is not supported by KNITRO.jl. We require a " *
44- " Knitro version greater than 11.0." ,
45- )
46- end
47- return
48- end
49-
5046function knitro_version ()
5147 length = 15
5248 release = zeros (Cchar, length)
You can’t perform that action at this time.
0 commit comments