Skip to content

Commit d7164c6

Browse files
committed
Merge branch 'fix-cmake-findmpfr' into 'v100-bugfix'
update FindMPFR.cmake according to review in soplex!523 See merge request integer/scip!4045
2 parents 17ab4ef + 0c84837 commit d7164c6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cmake/Modules/FindMPFR.cmake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# ${MPFR_INCLUDE_DIRS} contains the paths to mpfr.h (and mpfrxx.h) if MPFR is found.
2-
# ${MPFR_LIBRARIES} contains libmpfr and libmpfrxx if MPFR is found.
1+
# ${MPFR_INCLUDE_DIRS} contains the paths to mpfr.h if MPFR is found.
2+
# ${MPFR_LIBRARIES} contains libmpfr if MPFR is found.
33

44
# Check whether environment variable MPFR_DIR was set.
55
if(NOT MPFR_DIR)
@@ -26,7 +26,7 @@ else()
2626
PATH_SUFFIXES lib)
2727
endif()
2828

29-
SET(MPFR_LIBRARIES ${MPFR_LIBRARY} ${MPFRXX_LIBRARY})
29+
SET(MPFR_LIBRARIES ${MPFR_LIBRARY})
3030

3131
# look for mpir library and include files when mpfr could not be found
3232
if(NOT MPFR_LIBRARIES)
@@ -43,18 +43,18 @@ if(NOT MPFR_LIBRARIES)
4343
SET(MPFR_LIBRARIES ${MPFR_LIBRARY})
4444
endif()
4545

46-
file(GLOB MPFR_HEADERS "${MPFR_INCLUDE_DIRS}/mpfr.h" "${MPFR_INCLUDE_DIRS}/mpfr-*.h")
46+
file(GLOB MPFR_HEADERS "${MPFR_INCLUDE_DIRS}/mpfr.h")
4747
foreach (mpfr_header_filename ${MPFR_HEADERS})
4848
file(READ "${mpfr_header_filename}" _mpfr_version_header)
4949
string(REGEX MATCH
50-
"define[ \t]+__GNU_MP_VERSION[ \t]+([0-9]+)" _mpfr_major_version_match
50+
"define[ \t]+MPFR_VERSION_MAJOR[ \t]+([0-9]+)" _mpfr_major_version_match
5151
"${_mpfr_version_header}")
5252
if (_mpfr_major_version_match)
5353
set(MPFR_MAJOR_VERSION "${CMAKE_MATCH_1}")
54-
string(REGEX MATCH "define[ \t]+__GNU_MP_VERSION_MINOR[ \t]+([0-9]+)"
54+
string(REGEX MATCH "define[ \t]+MPFR_VERSION_MINOR[ \t]+([0-9]+)"
5555
_mpfr_minor_version_match "${_mpfr_version_header}")
5656
set(MPFR_MINOR_VERSION "${CMAKE_MATCH_1}")
57-
string(REGEX MATCH "define[ \t]+__GNU_MP_VERSION_PATCHLEVEL[ \t]+([0-9]+)"
57+
string(REGEX MATCH "define[ \t]+MPFR_VERSION_PATCHLEVEL[ \t]+([0-9]+)"
5858
_mpfr_patchlevel_version_match "${_mpfr_version_header}")
5959
set(MPFR_PATCHLEVEL_VERSION "${CMAKE_MATCH_1}")
6060
set(MPFR_VERSION

0 commit comments

Comments
 (0)