Skip to content
Snippets Groups Projects
Commit 79cc2c42 authored by Steffen Müthing's avatar Steffen Müthing Committed by Markus Blatt
Browse files

[bugfix] Fixes GMP test.

Previoulsy CMake always fails to find the __gmpz_abs symbol on my machine, even though it is clearly there.
The test used check_symbol_exists. According to the documentation, check_symbol_exists tries to include the
second argument into a test program to check whether there is a prototype for the first argument, so as the
second argument is a binary, that can't really work... This patch switches over to use check_library_exists.
parent e258dbd6
Branches
Tags
No related merge requests found
......@@ -46,7 +46,7 @@ find_library(GMPXX_LIB gmpxx)
# check if library works
if(GMP_LIB AND GMPXX_LIB)
include(CheckSymbolExists)
check_symbol_exists(__gmpz_abs ${GMP_LIB} GMPXX_LIB_WORKS)
check_library_exists(${GMP_LIB} __gmpz_abs "" GMPXX_LIB_WORKS)
endif(GMP_LIB AND GMPXX_LIB)
cmake_pop_check_state()
......@@ -88,4 +88,4 @@ if(HAVE_GMP)
foreach(dir ${GMP_INCLUDE_DIR})
set_property(GLOBAL APPEND PROPERTY ALL_PKG_FLAGS "-I${dir}")
endforeach()
endif()
\ No newline at end of file
endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment