@@ -98,15 +98,6 @@ set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1)
9898include (CTest)
9999
100100# By default only build the C++ library which agregate all components.
101- option (BUILD_CXX "Build C++ library" ON )
102- message (STATUS "Build C++ library: ${BUILD_CXX} " )
103-
104- # If we don't build ortools we could build the GLOP standalone project
105- if (NOT BUILD_CXX)
106- OPTION (BUILD_GLOP "Build GLOP standalone" ON )
107- message (STATUS "Build standalone Glop: ${BUILD_GLOP} " )
108- endif ()
109-
110101option (BUILD_PYTHON "Build Python Library" OFF )
111102message (STATUS "Build Python: ${BUILD_PYTHON} " )
112103option (BUILD_JAVA "Build Java Library" OFF )
@@ -123,17 +114,17 @@ include(CMakeDependentOption)
123114
124115# Optional components (enabled by default)
125116## Flatzinc
126- CMAKE_DEPENDENT_OPTION (BUILD_FLATZINC "Build flatzinc" ON "BUILD_CXX" OFF )
117+ option (BUILD_FLATZINC "Build flatzinc" ON )
127118message (STATUS "Build Flatzinc: ${BUILD_FLATZINC} " )
128119
129120## MathOpt
130- CMAKE_DEPENDENT_OPTION (BUILD_MATH_OPT "Build the MATH_OPT" ON "BUILD_CXX" OFF )
121+ option (BUILD_MATH_OPT "Build the MATH_OPT" ON )
131122message (STATUS "Build MathOpt: ${BUILD_MATH_OPT} " )
132123
133124## Samples
134125option (BUILD_SAMPLES "Build samples" ON )
135126message (STATUS "Build samples: ${BUILD_SAMPLES} " )
136- CMAKE_DEPENDENT_OPTION(BUILD_CXX_SAMPLES "Build cxx samples" ON "BUILD_SAMPLES;BUILD_CXX " OFF )
127+ CMAKE_DEPENDENT_OPTION(BUILD_CXX_SAMPLES "Build cxx samples" ON "BUILD_SAMPLES" OFF )
137128message (STATUS "Build C++ samples: ${BUILD_CXX_SAMPLES} " )
138129CMAKE_DEPENDENT_OPTION(BUILD_PYTHON_SAMPLES "Build python samples" ON "BUILD_SAMPLES;BUILD_PYTHON" OFF )
139130message (STATUS "Build Python samples: ${BUILD_PYTHON_SAMPLES} " )
@@ -145,7 +136,7 @@ message(STATUS "Build .Net samples: ${BUILD_DOTNET_SAMPLES}")
145136## Examples
146137option (BUILD_EXAMPLES "Build examples" ON )
147138message (STATUS "Build examples: ${BUILD_EXAMPLES} " )
148- CMAKE_DEPENDENT_OPTION(BUILD_CXX_EXAMPLES "Build cxx examples" ON "BUILD_EXAMPLES;BUILD_CXX " OFF )
139+ CMAKE_DEPENDENT_OPTION(BUILD_CXX_EXAMPLES "Build cxx examples" ON "BUILD_EXAMPLES" OFF )
149140message (STATUS "Build C++ examples: ${BUILD_CXX_EXAMPLES} " )
150141CMAKE_DEPENDENT_OPTION(BUILD_PYTHON_EXAMPLES "Build python examples" ON "BUILD_EXAMPLES;BUILD_PYTHON" OFF )
151142message (STATUS "Build Python examples: ${BUILD_PYTHON_EXAMPLES} " )
@@ -156,7 +147,7 @@ message(STATUS "Build .Net examples: ${BUILD_DOTNET_EXAMPLES}")
156147
157148option (BUILD_DOC "Build documentation" OFF )
158149message (STATUS "Build documentation: ${BUILD_DOC} " )
159- CMAKE_DEPENDENT_OPTION(INSTALL_DOC "Install doc" ON "BUILD_CXX AND BUILD_DOC" OFF )
150+ CMAKE_DEPENDENT_OPTION(INSTALL_DOC "Install doc" ON "BUILD_DOC" OFF )
160151message (STATUS "Install doc: ${INSTALL_DOC} " )
161152
162153# By default all dependencies are NOT built (i.e. BUILD_DEPS=OFF),
@@ -207,7 +198,7 @@ if(BUILD_TESTING)
207198 set (USE_fuzztest OFF )
208199 else ()
209200 # since no distro provide a fuzztest package disable support by default.
210- CMAKE_DEPENDENT_OPTION (USE_fuzztest "Enable fuzztest" ${BUILD_DEPS} "BUILD_CXX" OFF )
201+ option (USE_fuzztest "Enable fuzztest" ${BUILD_DEPS} )
211202 endif ()
212203 if (NOT USE_fuzztest)
213204 set (BUILD_fuzztest OFF )
@@ -232,11 +223,11 @@ message(STATUS "Build fuzztest: ${BUILD_fuzztest}")
232223# Optional third party solvers (enabled by default)
233224## BOP
234225# note OFF is currently not supported.
235- CMAKE_DEPENDENT_OPTION (USE_BOP "Use the BOP solver" ON "BUILD_CXX" OFF )
226+ option (USE_BOP "Use the BOP solver" ON )
236227message (STATUS "BOP support: ${USE_BOP} " )
237228
238229## COIN-OR Solvers (Cbc, Clp)
239- CMAKE_DEPENDENT_OPTION (USE_COINOR "Use the COIN-OR solver" ON "BUILD_CXX" OFF )
230+ option (USE_COINOR "Use the COIN-OR solver" ON )
240231message (STATUS "COIN-OR support: ${USE_COINOR} " )
241232if (USE_COINOR)
242233 CMAKE_DEPENDENT_OPTION(BUILD_CoinUtils "Build the CoinUtils dependency Library" OFF
@@ -267,14 +258,14 @@ else()
267258endif ()
268259
269260## GLOP
270- # note OFF is currently not supported.
271- CMAKE_DEPENDENT_OPTION (USE_GLOP "Use the GLOP solver" ON "BUILD_CXX" OFF )
261+ # note: -DUSE_GLOP= OFF is currently not supported.
262+ option (USE_GLOP "Use the GLOP solver" ON )
272263message (STATUS "GLOP support: ${USE_GLOP} " )
273264
274265## GLPK
275266# Disable by default since it is GPLv3, user could enable it and release under GPLv3
276267# see: https://www.apache.org/licenses/GPL-compatibility.html
277- CMAKE_DEPENDENT_OPTION (USE_GLPK "Use the GLPK solver" OFF "BUILD_CXX " OFF )
268+ option (USE_GLPK "Use the GLPK solver" OFF )
278269message (STATUS "GLPK support: ${USE_GLPK} " )
279270if (USE_GLPK)
280271 CMAKE_DEPENDENT_OPTION(BUILD_GLPK "Build the GLPK dependency Library" OFF
@@ -286,12 +277,12 @@ message(STATUS "Build GLPK: ${BUILD_GLPK}")
286277
287278## GUROBI
288279# Since it is dynamicaly loaded upon use, OFF is currently not supported.
289- CMAKE_DEPENDENT_OPTION (USE_GUROBI "Use the Gurobi solver" ON "BUILD_CXX" OFF )
280+ option (USE_GUROBI "Use the Gurobi solver" ON )
290281message (STATUS "Gurobi support: ${USE_GUROBI} " )
291282
292283## HiGHS
293284# see: https://github.com/ERGO-Code/HiGHS
294- CMAKE_DEPENDENT_OPTION (USE_HIGHS "Use the HiGHS solver" ON "BUILD_CXX" OFF )
285+ option (USE_HIGHS "Use the HiGHS solver" ON )
295286message (STATUS "HiGHS support: ${USE_HIGHS} " )
296287if (USE_HIGHS)
297288 CMAKE_DEPENDENT_OPTION(BUILD_HIGHS "Build the HiGHS dependency Library" OFF
@@ -302,7 +293,7 @@ endif()
302293message (STATUS "Build HiGHS: ${BUILD_HIGHS} " )
303294
304295## PDLP
305- CMAKE_DEPENDENT_OPTION (USE_PDLP "Use the PDLP solver" ON "BUILD_CXX" OFF )
296+ option (USE_PDLP "Use the PDLP solver" ON )
306297message (STATUS "PDLP support: ${USE_PDLP} " )
307298if (USE_PDLP)
308299 CMAKE_DEPENDENT_OPTION(BUILD_PDLP "Build the PDLP dependency Library" ON
@@ -314,7 +305,7 @@ message(STATUS "Build PDLP: ${BUILD_PDLP}")
314305
315306## SCIP
316307# see: https://github.com/scipopt/scip
317- CMAKE_DEPENDENT_OPTION (USE_SCIP "Use the Scip solver" ON "BUILD_CXX" OFF )
308+ option (USE_SCIP "Use the Scip solver" ON )
318309message (STATUS "SCIP support: ${USE_SCIP} " )
319310if (USE_SCIP)
320311 CMAKE_DEPENDENT_OPTION(BUILD_Boost "Build the Boost dependency Library" OFF
@@ -339,14 +330,12 @@ message(STATUS "CPLEX support: ${USE_CPLEX}")
339330
340331## XPRESS
341332# Since it is dynamicaly loaded upon use, OFF is currently not supported.
342- CMAKE_DEPENDENT_OPTION (USE_XPRESS "Use the Xpress solver" ON "BUILD_CXX" OFF )
333+ option (USE_XPRESS "Use the Xpress solver" ON )
343334message (STATUS "Xpress support: ${USE_XPRESS} " )
344335
345336# Language specific options
346- if (BUILD_CXX)
347- CMAKE_DEPENDENT_OPTION(BUILD_CXX_DOC "Build the C++ doc" OFF "NOT BUILD_DOC" ON )
348- message (STATUS "C++: Build doc: ${BUILD_CXX_DOC} " )
349- endif ()
337+ CMAKE_DEPENDENT_OPTION(BUILD_CXX_DOC "Build the C++ doc" OFF "NOT BUILD_DOC" ON )
338+ message (STATUS "C++: Build doc: ${BUILD_CXX_DOC} " )
350339
351340if (BUILD_DOTNET)
352341 option (UNIVERSAL_DOTNET_PACKAGE "Build a .Net multi OS Package" OFF )
@@ -463,7 +452,6 @@ include(check_deps)
463452
464453include (cpp)
465454include (flatzinc)
466- include (glop)
467455
468456include (python)
469457include (java)
0 commit comments