diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2015-12-12 07:09:29 +0000 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-12-15 04:47:24 +0000 |
commit | e89c4ec7f993c3713062731ddc193faa69f60f3e (patch) | |
tree | 18fc6156e6aafcf264e8f092af7f078bcb486d17 /ConfigureChecks.cmake | |
parent | 48c818f3af2a2270da7c85a4f84d6cea6349e095 (diff) |
cmake: Fix Unix introspection for floorl() [-Wredundant-decls]
Change-Id: I76a909c6f14b50b1a71205f9da2cb44a2e67969f
Reviewed-on: https://code.wireshark.org/review/12561
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index b052888455..4e896b6e07 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -96,7 +96,14 @@ cmake_pop_check_state() # Use check_symbol_exists just in case math.h does something magic # and there's not actually a function named floorl() # +if(UNIX) + set(_mathlib m) +endif() +cmake_push_check_state() +set(CMAKE_REQUIRED_LIBRARIES ${_mathlib}) check_symbol_exists("floorl" "math.h" HAVE_FLOORL) +cmake_pop_check_state() + check_function_exists("getaddrinfo" HAVE_GETADDRINFO) check_function_exists("gethostbyname" HAVE_GETHOSTBYNAME) check_function_exists("gethostbyname2" HAVE_GETHOSTBYNAME2) |