Warning, /frameworks/kjs/src/kjs/ConfigureChecks.cmake is written in an unsupported language. File is not indexed.

0001 # Configuration checks
0002 include(FindThreads)
0003 include(CheckLibraryExists)
0004 include(CheckIncludeFile)
0005 include(CheckIncludeFiles)
0006 include(CheckSymbolExists)
0007 include(CheckCXXSourceCompiles)
0008 include(CheckFunctionExists)
0009 include(CheckStructHasMember)
0010 
0011 check_library_exists(pthread pthread_attr_get_np "" HAVE_PTHREAD_ATTR_GET_NP)
0012 check_library_exists(pthread pthread_getattr_np "" HAVE_PTHREAD_GETATTR_NP)
0013 
0014 check_include_files("float.h"       HAVE_FLOAT_H)
0015 check_include_files("sys/timeb.h"   HAVE_SYS_TIMEB_H)
0016 check_include_files("ieeefp.h"      HAVE_IEEEFP_H)
0017 check_include_files("pthread.h;pthread_np.h" HAVE_PTHREAD_NP_H)
0018 check_include_files("valgrind/memcheck.h"   HAVE_MEMCHECK_H)
0019 check_include_files("unistd.h"      HAVE_UNISTD_H)
0020 check_include_files("stdint.h"      HAVE_STDINT_H)
0021 check_include_files("sys/time.h"    HAVE_SYS_TIME_H)
0022 check_include_files("sys/param.h"   HAVE_SYS_PARAM_H)
0023 check_include_files("errno.h"       HAVE_ERRNO_H)
0024 check_include_files("strings.h"     HAVE_STRINGS_H)
0025 check_include_files("crtdbg.h"      HAVE_CRTDBG_H)
0026 check_struct_has_member("struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF)
0027 
0028 if(NOT WIN32)
0029     set(CMAKE_REQUIRED_LIBRARIES "-lm")
0030 endif(NOT WIN32)
0031 
0032 check_function_exists(posix_memalign     HAVE_FUNC_POSIX_MEMALIGN)
0033 check_function_exists(gettimeofday    HAVE_GETTIMEOFDAY)
0034 
0035 macro (check_math_expr _expr _var)
0036     check_cxx_source_compiles("
0037 #include <math.h>
0038 #include <cmath>
0039 int main(int argc, char ** argv)
0040 {
0041     (void)${_expr};
0042     return 0;
0043 }
0044 " ${_var})
0045 endmacro()
0046 
0047 check_math_expr("copysign(1.0, 1.0)"     HAVE_FUNC_COPYSIGN)
0048 check_math_expr("_copysign(1.0, 1.0)"    HAVE_FUNC__COPYSIGN)
0049 
0050 check_math_expr("signbit(1.0)"      HAVE_FUNC_SIGNBIT)
0051 check_math_expr("__signbit(1.0)"    HAVE_FUNC___SIGNBIT)
0052 check_math_expr("std::signbit(1.0)" HAVE_FUNC_STD_SIGNBIT)
0053 
0054 check_math_expr("_finite(1.0)"       HAVE_FUNC__FINITE)
0055 check_math_expr("finite(1.0)"        HAVE_FUNC_FINITE)
0056 check_math_expr("std::isfinite(1.0)" HAVE_FUNC_STD_ISFINITE)
0057 
0058 check_math_expr("isnan(1.0)"       HAVE_FUNC_ISNAN)
0059 check_math_expr("std::isnan(1.0)"  HAVE_FUNC_STD_ISNAN)
0060 check_math_expr("isinf(1.0)"       HAVE_FUNC_ISINF)
0061 check_math_expr("std::isinf(1.0)"  HAVE_FUNC_STD_ISINF)
0062 
0063 check_math_expr("__builtin_clz(1)"  HAVE_FUNC_BUILTIN_CLZ)
0064 
0065 check_function_exists(_fpclass HAVE_FUNC__FPCLASS)