Skip to content

Commit 9ad7991

Browse files
committed
feat: CPLEX template
1 parent f4cf4d4 commit 9ad7991

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

meson.options

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@ option(
44
value: false,
55
description: 'Enable sanitizers for debugging'
66
)
7+
78
# option(
89
# 'ortools_root',
910
# type: 'string',
1011
# value: '',
1112
# description: 'Path to OR-Tools installation'
1213
# )
14+
15+
# option(
16+
# 'cplex_root',
17+
# type: 'string',
18+
# description: 'Absolute path to the IBM ILOG CPLEX installation root',
19+
# value: ''
20+
# )

meson/external-libs/meson.build

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,38 @@ external_dependencies = []
5656
#
5757
# external_dependencies += ortools_dep
5858

59+
# ---- CPLEX -----
60+
61+
# cplex_dep = dependency('cplex', required: false)
62+
#
63+
# if not cplex_dep.found()
64+
# cplex_root = get_option('cplex_root')
65+
#
66+
# if not cplex_root.startswith('/')
67+
# error('cplex_root must be an absolute path.')
68+
# endif
69+
#
70+
# compiler = meson.get_compiler('cpp')
71+
#
72+
# cplex_libdir = join_paths(cplex_root, 'cplex', 'lib', 'x86-64_linux', 'static_pic')
73+
# concert_libdir = join_paths(cplex_root, 'concert', 'lib', 'x86-64_linux', 'static_pic')
74+
# cplex_incdir = join_paths(cplex_root, 'cplex', 'include')
75+
# concert_incdir = join_paths(cplex_root, 'concert', 'include')
76+
#
77+
# cplex_lib = compiler.find_library('cplex', dirs: cplex_libdir)
78+
# ilocplex_lib = compiler.find_library('ilocplex', dirs: cplex_libdir)
79+
# concert_lib = compiler.find_library('concert', dirs: concert_libdir)
80+
#
81+
# dl_dep = compiler.find_library('dl', required: true)
82+
# threads_dep = dependency('threads')
83+
#
84+
# cplex_inc = include_directories(cplex_incdir, concert_incdir)
85+
#
86+
# cplex_dep = declare_dependency(
87+
# dependencies: [cplex_lib, ilocplex_lib, concert_lib, threads_dep, dl_dep],
88+
# include_directories: cplex_inc,
89+
# link_args: ['-Wl,-rpath,' + cplex_libdir, '-Wl,-rpath,' + concert_libdir]
90+
# )
91+
# endif
92+
#
93+
# external_dependencies += cplex_dep

0 commit comments

Comments
 (0)