Skip to content

Commit 492848c

Browse files
committed
Merge branch 'fix-mpfr-no-boost' into 'bugfix-70'
only look for MPFR if boost is available See merge request integer/soplex!438
2 parents 0363669 + 0591ad7 commit 492848c

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ fixed bugs:
3535
- fix bugs in function definitions in soplex_interface.cpp: SoPlex_changeVarUpperReal(), SoPlex_getUpperReal()
3636
- fix bugs in LP file reader, concerning rational numbers as well as dynamic line length
3737
- fix bug printing solutions and statistics when running from the command line
38+
- fix bug in cmake build system when MPFR is available but boost is not
3839

3940
Upcoming Bugfix Release 6.0.4
4041
=============================

CMakeLists.txt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,6 @@ if(GMP_FOUND)
141141
set(libs ${libs} ${GMP_LIBRARIES})
142142
endif()
143143

144-
if(MPFR)
145-
find_package(MPFR)
146-
endif()
147-
if(MPFR_FOUND)
148-
message("SoPlex with Boost MPFR libraries.")
149-
set(SOPLEX_WITH_MPFR on)
150-
include_directories(${MPFR_INCLUDE_DIRS})
151-
set(libs ${libs} ${MPFR_LIBRARIES})
152-
else()
153-
message("-- SoPlex with Boost CPP multiprecision libraries.")
154-
set(SOPLEX_WITH_CPPMPF on)
155-
endif()
156-
157144
if(QUADMATH)
158145
find_package(Quadmath)
159146
endif()
@@ -196,6 +183,18 @@ if(BOOST)
196183
Found Boost version is ${Boost_VERSION_STRING}")
197184
endif()
198185
endif()
186+
if(MPFR) # MPFR is used within boost multiprecision, so using it without Boost does not make sense
187+
find_package(MPFR)
188+
endif()
189+
if(MPFR_FOUND)
190+
message("SoPlex with Boost MPFR libraries.")
191+
set(SOPLEX_WITH_MPFR on)
192+
include_directories(${MPFR_INCLUDE_DIRS})
193+
set(libs ${libs} ${MPFR_LIBRARIES})
194+
else()
195+
message("-- SoPlex with Boost CPP multiprecision libraries.")
196+
set(SOPLEX_WITH_CPPMPF on)
197+
endif()
199198
else()
200199
set(BOOST off)
201200
endif()

0 commit comments

Comments
 (0)