summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMarcus Müller <mmueller@gnuradio.org>2021-03-19 15:54:39 +0100
committerMarcus Müller <marcus@hostalia.de>2021-03-20 18:46:42 +0100
commit43bfd85e10d8c83e2518ca2dc424d21c4b319f36 (patch)
tree4766b669dc3fabe4465670e772470e27727d67e5 /cmake
parent70db8842c1c7d39787792c7caae83ed5b238fa6a (diff)
CMake: Look for MPIR only when no GMP is found, be verbose
This seems to be a common confusion, so let's alleviate the confusion by letting users know what CMake does and why failing to find GMP is not a problem when MPIR is present. Since we preferred GMP over MPIR anyways, only check for MPIR if GMP detection fails. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindMPLIB.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/Modules/FindMPLIB.cmake b/cmake/Modules/FindMPLIB.cmake
index 37673b136b..daa381b643 100644
--- a/cmake/Modules/FindMPLIB.cmake
+++ b/cmake/Modules/FindMPLIB.cmake
@@ -1,7 +1,7 @@
find_package(GMP)
-find_package(MPIR)
if(GMP_FOUND)
+ message(STATUS "Using GMP.")
set(GR_MPLIB_GMP True)
set(MPLIB_DEFINITIONS "-DGR_MPLIB_GMP" ${GMP_DEFINITIONS})
set(MPLIB_INCLUDE_DIR ${GMP_INCLUDE_DIR})
@@ -10,6 +10,9 @@ if(GMP_FOUND)
set(MPLIB_PC_ADD_CFLAGS ${GMP_PC_ADD_CFLAGS})
set(MPLIB_PC_ADD_LIBS ${GMP_PC_ADD_LIBS})
else(GMP_FOUND)
+ message(STATUS "GMP not found; this is not a problem if MPIR can be found.")
+ find_package(MPIR REQUIRED)
+ message(STATUS "MPIR found")
set(GR_MPLIB_MPIR True)
set(MPLIB_DEFINITIONS "-DGR_MPLIB_MPIR" ${MPIR_DEFINITIONS})
set(MPLIB_INCLUDE_DIR ${MPIR_INCLUDE_DIR})