Skip to content

Commit 4c0fe91

Browse files
committed
cmake: remove BUILD_GLOP support
1 parent e5b7680 commit 4c0fe91

File tree

9 files changed

+37
-669
lines changed

9 files changed

+37
-669
lines changed

.github/workflows/amd64_cmake_glop_cpp.yml

Lines changed: 0 additions & 107 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,6 @@ set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1)
9898
include(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-
110101
option(BUILD_PYTHON "Build Python Library" OFF)
111102
message(STATUS "Build Python: ${BUILD_PYTHON}")
112103
option(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)
127118
message(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)
131122
message(STATUS "Build MathOpt: ${BUILD_MATH_OPT}")
132123

133124
## Samples
134125
option(BUILD_SAMPLES "Build samples" ON)
135126
message(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)
137128
message(STATUS "Build C++ samples: ${BUILD_CXX_SAMPLES}")
138129
CMAKE_DEPENDENT_OPTION(BUILD_PYTHON_SAMPLES "Build python samples" ON "BUILD_SAMPLES;BUILD_PYTHON" OFF)
139130
message(STATUS "Build Python samples: ${BUILD_PYTHON_SAMPLES}")
@@ -145,7 +136,7 @@ message(STATUS "Build .Net samples: ${BUILD_DOTNET_SAMPLES}")
145136
## Examples
146137
option(BUILD_EXAMPLES "Build examples" ON)
147138
message(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)
149140
message(STATUS "Build C++ examples: ${BUILD_CXX_EXAMPLES}")
150141
CMAKE_DEPENDENT_OPTION(BUILD_PYTHON_EXAMPLES "Build python examples" ON "BUILD_EXAMPLES;BUILD_PYTHON" OFF)
151142
message(STATUS "Build Python examples: ${BUILD_PYTHON_EXAMPLES}")
@@ -156,7 +147,7 @@ message(STATUS "Build .Net examples: ${BUILD_DOTNET_EXAMPLES}")
156147

157148
option(BUILD_DOC "Build documentation" OFF)
158149
message(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)
160151
message(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)
236227
message(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)
240231
message(STATUS "COIN-OR support: ${USE_COINOR}")
241232
if(USE_COINOR)
242233
CMAKE_DEPENDENT_OPTION(BUILD_CoinUtils "Build the CoinUtils dependency Library" OFF
@@ -267,14 +258,14 @@ else()
267258
endif()
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)
272263
message(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)
278269
message(STATUS "GLPK support: ${USE_GLPK}")
279270
if(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)
290281
message(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)
295286
message(STATUS "HiGHS support: ${USE_HIGHS}")
296287
if(USE_HIGHS)
297288
CMAKE_DEPENDENT_OPTION(BUILD_HIGHS "Build the HiGHS dependency Library" OFF
@@ -302,7 +293,7 @@ endif()
302293
message(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)
306297
message(STATUS "PDLP support: ${USE_PDLP}")
307298
if(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)
318309
message(STATUS "SCIP support: ${USE_SCIP}")
319310
if(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)
343334
message(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

351340
if(BUILD_DOTNET)
352341
option(UNIVERSAL_DOTNET_PACKAGE "Build a .Net multi OS Package" OFF)
@@ -463,7 +452,6 @@ include(check_deps)
463452

464453
include(cpp)
465454
include(flatzinc)
466-
include(glop)
467455

468456
include(python)
469457
include(java)

cmake/Makefile

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,6 @@ help:
148148
@echo -e "\t\t${BOLD}openbsd${RESET} (OpenBSD 7)"
149149
@echo -e "\te.g. 'make freebsd_cpp'"
150150
@echo
151-
@echo -e "\t${BOLD}glop_<stage>${RESET}: Build Glop <stage> using an Ubuntu:rolling docker image."
152-
@echo -e "\t${BOLD}save_glop_<stage>${RESET}: Save Glop <stage> using an Ubuntu:rolling docker image."
153-
@echo -e "\t${BOLD}sh_glop_<stage>${RESET}: Run a Glop <stage> container using an Ubuntu:rolling docker image (debug purpose)."
154-
@echo -e "\t${BOLD}clean_glop_<stage>${RESET}: Remove the Glop <stage> docker image (and the save archive if any) for a specific distro."
155-
@echo
156151
@echo -e "\tGlobal targets."
157152
@echo -e "\t${BOLD}clean${RESET}: Remove ALL caches and docker images."
158153
@echo -e "\t${BOLD}distclean${RESET}: Remove everything."
@@ -762,44 +757,11 @@ $(foreach vms,$(VAGRANT_VMS),$(eval $(call make-vagrant-target,$(vms))))
762757
.PHONY: clean_vagrant
763758
clean_vagrant: $(addprefix clean_, $(VAGRANT_VMS))
764759

765-
##########
766-
## GLOP ##
767-
##########
768-
glop_targets = $(addprefix glop_, $(STAGES))
769-
.PHONY: $(glop_targets)
770-
$(glop_targets): glop_%: docker/glop/Dockerfile
771-
#@docker image rm -f ${IMAGE}:$@ 2>/dev/null
772-
${DOCKER_BUILD_CMD} --target=$* --tag ${IMAGE}:$@ -f $< ..
773-
774-
save_glop_targets = $(addprefix save_glop_, $(STAGES))
775-
.PHONY: $(save_glop_targets)
776-
$(save_glop_targets): save_glop_%: cache/glop/docker_%.tar
777-
cache/glop/docker_%.tar: glop_%
778-
@rm -f $@
779-
mkdir -p cache/$*
780-
docker save ${IMAGE}:$< -o $@
781-
782-
sh_glop_targets = $(addprefix sh_glop_, $(STAGES))
783-
.PHONY: $(sh_glop_targets)
784-
$(sh_glop_targets): sh_glop_%: glop_%
785-
${DOCKER_RUN_CMD} -it --name ${PROJECT}_${BUILD_SYSTEM}_$< ${IMAGE}:$<
786-
787-
clean_glop_targets = $(addprefix clean_glop_, $(STAGES))
788-
.PHONY: $(clean_glop_targets)
789-
$(clean_glop_targets): clean_glop_%
790-
docker image rm -f ${IMAGE}:glop_$* 2>/dev/null
791-
rm -f cache/glop/docker_$*.tar
792-
793-
## MERGE ##
794-
.PHONY: clean_glop
795-
clean_glop: $(addprefix clean_glop_, $(STAGES))
796-
rm -f cache/glop
797-
798760
###########
799761
## CLEAN ##
800762
###########
801763
.PHONY: clean
802-
clean: clean_all clean_platforms clean_toolchains clean_web clean_vagrant clean_glop
764+
clean: clean_all clean_platforms clean_toolchains clean_web clean_vagrant
803765
docker container prune -f
804766
docker image prune -f
805767
-rmdir cache

cmake/README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,11 @@ cmake -S. -Bbuild -LH
178178
CMake Option | Default Value | Note
179179
:------------------------------ | :-------------- | :---
180180
`CMAKE_BUILD_TYPE` | Release | see CMake documentation [here](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html)
181-
`BUILD_CXX` | ON | Build C++
182181
`BUILD_DOTNET` | OFF | Build .Net wrapper and packages
183182
`BUILD_JAVA` | OFF | Build Java wrapper and packages
184183
`BUILD_PYTHON` | OFF | Build Python wrapper and package
185184
| |
186-
`BUILD_FLATZINC` | ON\* | Build the flatzinc library<br>**Forced** to OFF if `BUILD_CXX=OFF`
187-
`BUILD_GLOP` | OFF\* | Build the standalone Glop library<br>**Forced** to OFF if `BUILD_CXX=ON`, otherwise default to ON
185+
`BUILD_FLATZINC` | ON\* | Build the flatzinc library
188186
| **Dependencies** |
189187
`BUILD_DEPS` | OFF* | Default to ON if `BUILD_JAVA=ON` or `BUILD_PYTHON=ON` or `BUILD_DOTNET=ON`
190188
`BUILD_ZLIB` | OFF* | Build the zlib dynamic library<br>**Forced** to ON if `BUILD_DEPS=ON`
@@ -194,20 +192,20 @@ CMake Option | Default Value | Note
194192
`BUILD_re2` | OFF* | Build the re2 dynamic libraries<br>**Forced** to ON if `BUILD_DEPS=ON`
195193
`BUILD_Eigen3` | OFF* | Build the Eigen3 libraries<br>**Forced** to ON if `BUILD_DEPS=ON`
196194
| Coin-OR |
197-
`USE_COINOR` | ON\* | Enable Coin-OR support<br>**Forced** to OFF if `BUILD_CXX=OFF`
195+
`USE_COINOR` | ON\* | Enable Coin-OR support
198196
`BUILD_CoinUtils` | OFF\* | Build the CoinUtils dynamic library<br>**Forced** to ON if `USE_COINOR=ON` **and** `BUILD_DEPS=ON`
199197
`BUILD_Osi` | OFF\* | Build the Osi dynamic library<br>**Forced** to ON if `USE_COINOR=ON` **and** `BUILD_DEPS=ON`
200198
`BUILD_Clp` | OFF\* | Build the Clp dynamic library<br>**Forced** to ON if `USE_COINOR=ON` **and** `BUILD_DEPS=ON`
201199
`BUILD_Cgl` | OFF\* | Build the Cgl dynamic library<br>**Forced** to ON if `USE_COINOR=ON` **and** `BUILD_DEPS=ON`
202200
`BUILD_Cbc` | OFF\* | Build the Cbc dynamic library<br>**Forced** to ON if `USE_COINOR=ON` **and** `BUILD_DEPS=ON`
203201
| GLPK |
204-
`USE_GLPK` | OFF\* | Enable GLPK support<br>**Forced** to OFF if `BUILD_CXX=OFF`
202+
`USE_GLPK` | OFF\* | Enable GLPK support
205203
`BUILD_GLPK` | OFF\* | Build the GLPK dynamic libraries<br>**Forced** to ON if `USE_GLPK=ON` **and** `BUILD_DEPS=ON`
206204
| HiGHS |
207-
`USE_HIGHS` | ON\* | Enable HIGHS support<br>**Forced** to OFF if `BUILD_CXX=OFF`
205+
`USE_HIGHS` | ON\* | Enable HIGHS support
208206
`BUILD_HIGHS` | OFF\* | Build the HiGHS dynamic libraries<br>**Forced** to ON if `USE_HIGHS=ON` **and** `BUILD_DEPS=ON`
209207
| SCIP |
210-
`USE_SCIP` | ON\* | Enable SCIP support<br>**Forced** to OFF if `BUILD_CXX=OFF`
208+
`USE_SCIP` | ON\* | Enable SCIP support
211209
`BUILD_SCIP` | OFF\* | Build the SCIP dynamic libraries<br>**Forced** to ON if `USE_SCIP=ON` **and** `BUILD_DEPS=ON`
212210
| CPLEX
213211
`USE_CPLEX` | OFF | Enable CPLEX support
@@ -217,16 +215,16 @@ CMake Option | Default Value | Note
217215
`BUILD_DOTNET_DOC` | OFF\* | Build .Net documentation<br>**Forced** to ON if `BUILD_DOC=ON`
218216
`BUILD_JAVA_DOC` | OFF\* | Build Java documentation<br>**Forced** to ON if `BUILD_DOC=ON`
219217
`BUILD_PYTHON_DOC` | OFF\* | Build Python documentation<br>**Forced** to ON if `BUILD_DOC=ON`
220-
`INSTALL_DOC` | OFF\* | Install all documentations<br>**Forced** to OFF if `BUILD_CXX=OFF` or `BUILD_DOC=OFF`
218+
`INSTALL_DOC` | OFF\* | Install all documentations<br>**Forced** to OFF if `BUILD_DOC=OFF`
221219
| **Samples** |
222220
`BUILD_SAMPLES` | ON\* | Build all samples<br>Default to ON if `BUILD_DEPS=ON`
223-
`BUILD_CXX_SAMPLES` | ON\* | Build all C++ samples<br>**Forced** to OFF if `BUILD_CXX=OFF` or `BUILD_SAMPLE=OFF`
221+
`BUILD_CXX_SAMPLES` | ON\* | Build all C++ samples<br>**Forced** to OFF if `BUILD_SAMPLE=OFF`
224222
`BUILD_DOTNET_SAMPLES` | ON\* | Build all .Net samples<br>**Forced** to OFF if `BUILD_DOTNET=OFF` or `BUILD_SAMPLE=OFF`
225223
`BUILD_JAVA_SAMPLES` | ON\* | Build all Java samples<br>**Forced** to OFF if `BUILD_JAVA=OFF` or `BUILD_SAMPLE=OFF`
226224
`BUILD_PYTHON_SAMPLES` | ON\* | Build all Python samples<br>**Forced** to OFF if `BUILD_PYTHON=OFF` or `BUILD_SAMPLE=OFF`
227225
| **Examples** |
228226
`BUILD_EXAMPLES` | ON\* | Build all examples<br>Default to ON if `BUILD_DEPS=ON`
229-
`BUILD_CXX_EXAMPLES` | ON\* | Build all C++ examples<br>**Forced** to OFF if `BUILD_CXX=OFF` or `BUILD_SAMPLE=OFF`
227+
`BUILD_CXX_EXAMPLES` | ON\* | Build all C++ examples<br>**Forced** to OFF if `BUILD_SAMPLE=OFF`
230228
`BUILD_DOTNET_EXAMPLES` | ON\* | Build all .Net examples<br>**Forced** to OFF if `BUILD_DOTNET=OFF` or `BUILD_SAMPLE=OFF`
231229
`BUILD_JAVA_EXAMPLES` | ON\* | Build all Java examples<br>**Forced** to OFF if `BUILD_JAVA=OFF` or `BUILD_SAMPLE=OFF`
232230
`BUILD_PYTHON_EXAMPLES` | ON\* | Build all Python examples<br>**Forced** to OFF if `BUILD_PYTHON=OFF` or `BUILD_SAMPLE=OFF`

cmake/cpp.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313

14-
if(NOT BUILD_CXX)
15-
return()
16-
endif()
17-
1814
# Check primitive types
1915
option(CHECK_TYPE "Check primitive type size" OFF)
2016
if(CHECK_TYPE)

0 commit comments

Comments
 (0)