diff options
author | Oscar Fuentes <ofv@wanadoo.es> | 2009-11-12 05:36:09 +0000 |
---|---|---|
committer | Oscar Fuentes <ofv@wanadoo.es> | 2009-11-12 05:36:09 +0000 |
commit | 469f048845803a7e0a71fc315e6962f3978ff466 (patch) | |
tree | 6f0c19f3e95633fd852b17c3c749d31125856c85 /cmake/config-ix.cmake | |
parent | 670358cf61e1f7b5c6753dc2fc08b336634dac1e (diff) | |
download | external_llvm-469f048845803a7e0a71fc315e6962f3978ff466.zip external_llvm-469f048845803a7e0a71fc315e6962f3978ff466.tar.gz external_llvm-469f048845803a7e0a71fc315e6962f3978ff466.tar.bz2 |
CMake: Pass -lm to check_symbol_exists for detecting several math
functions like floorf, ceilf, ... Add test for detecting nearbyintf.
This change was prompted by test/Transforms/SimplifyLibCalls/floor.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86954 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/config-ix.cmake')
-rwxr-xr-x | cmake/config-ix.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index 28dee47..3a2b91c 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -4,6 +4,11 @@ include(CheckSymbolExists) include(CheckFunctionExists) include(CheckCXXSourceCompiles) +if( UNIX ) + # Used by check_symbol_exists: + set(CMAKE_REQUIRED_LIBRARIES m) +endif() + # Helper macros and functions macro(add_cxx_include result files) set(${result} "") @@ -84,6 +89,7 @@ check_symbol_exists(isnan cmath HAVE_ISNAN_IN_CMATH) check_symbol_exists(isnan math.h HAVE_ISNAN_IN_MATH_H) check_symbol_exists(ceilf math.h HAVE_CEILF) check_symbol_exists(floorf math.h HAVE_FLOORF) +check_symbol_exists(nearbyintf math.h HAVE_NEARBYINTF) check_symbol_exists(mallinfo malloc.h HAVE_MALLINFO) check_symbol_exists(malloc_zone_statistics malloc/malloc.h HAVE_MALLOC_ZONE_STATISTICS) |