Skip to content

Commit

Permalink
Merge branch 'fix-mpfr-no-boost' into 'bugfix-70'
Browse files Browse the repository at this point in the history
only look for MPFR if boost is available

See merge request integer/soplex!438
  • Loading branch information
leoneifler committed Jan 29, 2024
2 parents 0363669 + 0591ad7 commit 492848c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ fixed bugs:
- fix bugs in function definitions in soplex_interface.cpp: SoPlex_changeVarUpperReal(), SoPlex_getUpperReal()
- fix bugs in LP file reader, concerning rational numbers as well as dynamic line length
- fix bug printing solutions and statistics when running from the command line
- fix bug in cmake build system when MPFR is available but boost is not

Upcoming Bugfix Release 6.0.4
=============================
Expand Down
25 changes: 12 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,6 @@ if(GMP_FOUND)
set(libs ${libs} ${GMP_LIBRARIES})
endif()

if(MPFR)
find_package(MPFR)
endif()
if(MPFR_FOUND)
message("SoPlex with Boost MPFR libraries.")
set(SOPLEX_WITH_MPFR on)
include_directories(${MPFR_INCLUDE_DIRS})
set(libs ${libs} ${MPFR_LIBRARIES})
else()
message("-- SoPlex with Boost CPP multiprecision libraries.")
set(SOPLEX_WITH_CPPMPF on)
endif()

if(QUADMATH)
find_package(Quadmath)
endif()
Expand Down Expand Up @@ -196,6 +183,18 @@ if(BOOST)
Found Boost version is ${Boost_VERSION_STRING}")
endif()
endif()
if(MPFR) # MPFR is used within boost multiprecision, so using it without Boost does not make sense
find_package(MPFR)
endif()
if(MPFR_FOUND)
message("SoPlex with Boost MPFR libraries.")
set(SOPLEX_WITH_MPFR on)
include_directories(${MPFR_INCLUDE_DIRS})
set(libs ${libs} ${MPFR_LIBRARIES})
else()
message("-- SoPlex with Boost CPP multiprecision libraries.")
set(SOPLEX_WITH_CPPMPF on)
endif()
else()
set(BOOST off)
endif()
Expand Down

0 comments on commit 492848c

Please sign in to comment.