Skip to content

Commit 7e5ba8a

Browse files
committed
cmake: bump scip to v10.0.2
* bump soplex to v8.0.2 * remove boost dependencies (only needed by soplex binaries)
1 parent b19bca4 commit 7e5ba8a

5 files changed

Lines changed: 10 additions & 144 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,18 +291,14 @@ message(STATUS "Build PDLP: ${BUILD_PDLP}")
291291
option(USE_SCIP "Use the Scip solver" ON)
292292
message(STATUS "SCIP support: ${USE_SCIP}")
293293
if(USE_SCIP)
294-
CMAKE_DEPENDENT_OPTION(BUILD_Boost "Build the Boost dependency Library" OFF
295-
"NOT BUILD_DEPS" ON)
296294
CMAKE_DEPENDENT_OPTION(BUILD_soplex "Build the Soplex dependency Library" OFF
297295
"NOT BUILD_DEPS" ON)
298296
CMAKE_DEPENDENT_OPTION(BUILD_SCIP "Build the SCIP dependency Library" OFF
299297
"NOT BUILD_DEPS" ON)
300298
else()
301-
set(BUILD_Boost OFF)
302299
set(BUILD_soplex OFF)
303300
set(BUILD_SCIP OFF)
304301
endif()
305-
message(STATUS "Build Boost (Soplex requirement): ${BUILD_Boost}")
306302
message(STATUS "Build Soplex (SCIP requirement): ${BUILD_soplex}")
307303
message(STATUS "Build SCIP: ${BUILD_SCIP}")
308304

cmake/dependencies/CMakeLists.txt

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -324,34 +324,6 @@ if(BUILD_HIGHS)
324324
message(CHECK_PASS "fetched")
325325
endif()
326326

327-
# ##############################################################################
328-
# BOOST
329-
# ##############################################################################
330-
if(BUILD_Boost)
331-
message(CHECK_START "Fetching Boost")
332-
list(APPEND CMAKE_MESSAGE_INDENT " ")
333-
FetchContent_Declare(
334-
Boost
335-
GIT_REPOSITORY "https://github.com/boostorg/boost.git"
336-
GIT_TAG "boost-1.87.0"
337-
GIT_SHALLOW TRUE
338-
GIT_SUBMODULES_RECURSE TRUE
339-
UPDATE_COMMAND git reset --hard --recurse-submodules
340-
PATCH_COMMAND git apply --ignore-whitespace
341-
"${CMAKE_CURRENT_LIST_DIR}/../../patches/boost-1.87.0.patch"
342-
OVERRIDE_FIND_PACKAGE # Needed for Soplex
343-
SYSTEM
344-
)
345-
set(BOOST_INCLUDE_LIBRARIES multiprecision serialization)
346-
option(BOOST_SKIP_INSTALL_RULES NO)
347-
set(BOOST_ENABLE_CMAKE ON)
348-
set(BUILD_SHARED_LIBS OFF)
349-
FetchContent_MakeAvailable(Boost)
350-
set(BUILD_SHARED_LIBS ON)
351-
list(POP_BACK CMAKE_MESSAGE_INDENT)
352-
message(CHECK_PASS "fetched")
353-
endif()
354-
355327
# ##############################################################################
356328
# SOPLEX
357329
# ##############################################################################
@@ -361,17 +333,17 @@ if(BUILD_soplex)
361333
FetchContent_Declare(
362334
soplex
363335
GIT_REPOSITORY "https://github.com/scipopt/soplex.git"
364-
GIT_TAG "v8.0.0"
336+
GIT_TAG "v8.0.2"
365337
GIT_SHALLOW TRUE
366338
UPDATE_COMMAND git reset --hard
367339
PATCH_COMMAND git apply --ignore-whitespace
368-
"${CMAKE_CURRENT_LIST_DIR}/../../patches/soplex-v8.0.0.patch"
340+
"${CMAKE_CURRENT_LIST_DIR}/../../patches/soplex-v8.0.2.patch"
369341
SYSTEM
370342
)
371343
set(SHARED ON CACHE BOOL "Soplex param" FORCE)
372344
set(ZLIB ON CACHE BOOL "Soplex param" FORCE)
373345
set(GMP OFF CACHE BOOL "Soplex param" FORCE)
374-
set(BOOST ON CACHE BOOL "Soplex param" FORCE)
346+
set(BOOST OFF CACHE BOOL "Soplex param" FORCE)
375347
set(QUADMATH OFF CACHE BOOL "Soplex param" FORCE)
376348
set(MPFR OFF CACHE BOOL "Soplex param" FORCE)
377349
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON CACHE BOOL "Soplex param" FORCE)
@@ -392,11 +364,11 @@ if(BUILD_SCIP)
392364
FetchContent_Declare(
393365
scip
394366
GIT_REPOSITORY "https://github.com/scipopt/scip.git"
395-
GIT_TAG "v10.0.0"
367+
GIT_TAG "v10.0.2"
396368
GIT_SHALLOW TRUE
397369
UPDATE_COMMAND git reset --hard
398370
PATCH_COMMAND git apply --ignore-whitespace
399-
"${CMAKE_CURRENT_LIST_DIR}/../../patches/scip-v10.0.0.patch"
371+
"${CMAKE_CURRENT_LIST_DIR}/../../patches/scip-v10.0.2.patch"
400372
SYSTEM
401373
)
402374
set(SHARED ON CACHE BOOL "Scip param" FORCE)

patches/boost-1.87.0.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index b3c57799..eeeca4c8 100644
2+
index e12c43fb..cc1b6970 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
55
@@ -52,9 +52,11 @@ set(CPACK_PACKAGE_VENDOR "Zuse Institute Berlin")
@@ -107,33 +107,3 @@ index c6ce7283..6b6b1fc8 100644
107107
install(FILES "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/scip-config.cmake"
108108
${PROJECT_BINARY_DIR}/scip-config-version.cmake
109109
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/scip)
110-
diff --git a/src/tinycthread/tinycthread.h b/src/tinycthread/tinycthread.h
111-
index e0f4823c..29ca4f1e 100644
112-
--- a/src/tinycthread/tinycthread.h
113-
+++ b/src/tinycthread/tinycthread.h
114-
@@ -450,8 +450,12 @@ int tss_set(tss_t key, void *val);
115-
} once_flag;
116-
#define ONCE_FLAG_INIT {0,}
117-
#else
118-
- #define once_flag pthread_once_t
119-
- #define ONCE_FLAG_INIT PTHREAD_ONCE_INIT
120-
+ /* Check if the system already provides C11 threads or once_flag */
121-
+ #if !defined(__once_flag_defined)
122-
+ typedef pthread_once_t once_flag;
123-
+ #define ONCE_FLAG_INIT PTHREAD_ONCE_INIT
124-
+ #define __once_flag_defined
125-
+ #endif
126-
#endif
127-
128-
/** Invoke a callback exactly once
129-
@@ -462,7 +466,9 @@ int tss_set(tss_t key, void *val);
130-
#if defined(_TTHREAD_WIN32_)
131-
void call_once(once_flag *flag, void (*func)(void));
132-
#else
133-
- #define call_once(flag,func) pthread_once(flag,func)
134-
+ inline void call_once(once_flag *flag, void (*func)(void)) {
135-
+ pthread_once(flag, func);
136-
+ }
137-
#endif
138-
139-
#ifdef __cplusplus
Lines changed: 4 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 9511442..3993fc4 100644
2+
index 1c00fb3..6d2f282 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
55
@@ -1,4 +1,4 @@
@@ -49,7 +49,7 @@ index 9511442..3993fc4 100644
4949

5050
# set function visibility default to hidden
5151
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
52-
@@ -124,12 +136,11 @@ if(COVERAGE)
52+
@@ -127,12 +139,11 @@ if(COVERAGE)
5353
endif()
5454

5555
if(ZLIB)
@@ -67,67 +67,7 @@ index 9511442..3993fc4 100644
6767
endif()
6868

6969
if(GMP)
70-
@@ -171,42 +182,24 @@ else()
71-
set(SOPLEX_WITH_PAPILO off)
72-
endif()
73-
74-
-set(BOOST_MINIMUM_VERSION 1.65.0)
75-
+set(BOOST_MINIMUM_VERSION 1.65.0) # PaPILO requires at least Boost 1.65 (on mac 1.72)
76-
if(BOOST)
77-
- find_package(Boost ${BOOST_MINIMUM_VERSION}) # PaPILO requires at least Boost 1.65 (on mac 1.72)
78-
- if(Boost_FOUND)
79-
- set(SOPLEX_WITH_BOOST on)
80-
- if(NOT Boost_VERSION_MACRO)
81-
- set(Boost_VERSION_MACRO ${Boost_VERSION})
82-
- endif()
83-
- if(${Boost_VERSION_MACRO} LESS "107000")
84-
- if(NOT SOPLEX_WITH_GMP)
85-
- message(SEND_ERROR "If no GMP is linked, then the minimal Boost verion is 1.70. \
86-
- Found Boost version is ${Boost_VERSION_STRING}. Either provide newer Boost, link GMP, or disable Boost by setting BOOST=off.")
87-
- else()
88-
- message(WARNING "The multiprecision and quadprecision features are disabled with Boost versions older than 1.70. \
89-
- Found Boost version is ${Boost_VERSION_STRING}.")
90-
- endif()
91-
- endif()
92-
- if(Boost_DIR)
93-
- message(STATUS "Found Boost: ${Boost_DIR}")
94-
- endif()
95-
- set(libs ${libs} Boost::boost)
96-
- if(MPFR) # MPFR is used within boost multiprecision, so using it without Boost does not make sense
97-
- find_package(MPFR)
98-
- endif()
99-
- if(MPFR_FOUND)
100-
- message(STATUS "SoPlex with Boost MPFR ${MPFR_VERSION} libraries")
101-
- set(SOPLEX_WITH_MPFR on)
102-
- include_directories(${MPFR_INCLUDE_DIRS})
103-
- set(libs ${libs} ${MPFR_LIBRARIES})
104-
- else()
105-
- message(STATUS "SoPlex with Boost CPP multiprecision libraries")
106-
- set(SOPLEX_WITH_CPPMPF on)
107-
- endif()
108-
- else()
109-
- set(BOOST off)
110-
- endif()
111-
+ if(NOT TARGET Boost::multiprecision OR NOT TARGET Boost::serialization)
112-
+ message(FATAL_ERROR "Boost::multiprecision or Boost::serialization not available!!!")
113-
+ find_package(Boost ${BOOST_MINIMUM_VERSION} REQUIRED)
114-
+ endif()
115-
+ set(SOPLEX_WITH_BOOST on)
116-
+ set(libs ${libs} Boost::multiprecision Boost::serialization)
117-
+ if(MPFR) # MPFR is used within boost multiprecision, so using it without Boost does not make sense
118-
+ find_package(MPFR REQUIRED)
119-
+ message(STATUS "SoPlex with Boost MPFR libraries")
120-
+ set(SOPLEX_WITH_MPFR on)
121-
+ include_directories(${MPFR_INCLUDE_DIRS})
122-
+ set(libs ${libs} ${MPFR_LIBRARIES})
123-
+ else()
124-
+ message(STATUS "SoPlex with Boost CPP multiprecision libraries")
125-
+ set(SOPLEX_WITH_CPPMPF on)
126-
+ endif()
127-
endif()
128-
129-
# disable fused floating point contraction to enhance reproducibility across compilers and architectures
130-
@@ -251,7 +244,7 @@ set(EXTRA_CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
70+
@@ -254,7 +265,7 @@ set(EXTRA_CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
13171
configure_file(${PROJECT_SOURCE_DIR}/soplex-config.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/soplex-config.cmake" @ONLY)
13272

13373
add_subdirectory(src)
@@ -140,7 +80,7 @@ index 9511442..3993fc4 100644
14080
+ add_subdirectory(check)
14181
+endif()
14282
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
143-
index d57c5fe..11f914a 100644
83+
index f3758e1..ecde9ae 100644
14484
--- a/src/CMakeLists.txt
14585
+++ b/src/CMakeLists.txt
14686
@@ -193,28 +193,32 @@ target_link_libraries(libsoplexshared libsoplex ${libs})

0 commit comments

Comments
 (0)