Fix comment typo.
[oota-llvm.git] / cmake / config-ix.cmake
index ca5e0bfe384cb8ae11ee942aad060732e793a711..e72560bcef1928f2464ef7509f99e21b80d2a6f6 100755 (executable)
@@ -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} "")
@@ -62,6 +67,7 @@ check_include_file(sys/wait.h HAVE_SYS_WAIT_H)
 check_include_file(termios.h HAVE_TERMIOS_H)
 check_include_file(unistd.h HAVE_UNISTD_H)
 check_include_file(utime.h HAVE_UTIME_H)
+check_include_file(valgrind/valgrind.h HAVE_VALGRIND_VALGRIND_H)
 check_include_file(windows.h HAVE_WINDOWS_H)
 
 # library checks
@@ -84,6 +90,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)
@@ -136,7 +143,6 @@ function(llvm_find_program name)
     mark_as_advanced(HAVE_${NAME})
   else(LLVM_PATH_${NAME})
     set(HAVE_${NAME} "" CACHE INTERNAL "Is ${name} available ?")
-    unset(LLVM_PATH_${NAME} CACHE)
   endif(LLVM_PATH_${NAME})
 endfunction()