Convert 5 m4 checks to cmake modules

This commit is contained in:
Benoit Jacob
2007-05-30 18:08:35 +00:00
parent 7947ae0e50
commit 658eccd43b
7 changed files with 146 additions and 2 deletions

30
cmake/CheckIeeeMath.cmake Normal file
View File

@@ -0,0 +1,30 @@
INCLUDE(CheckCXXSourceCompiles)
MACRO (CHECK_IEEE_MATH _RESULT)
SET(_CHECK_IEEE_MATH_SOURCE_CODE "
#include<cmath>
int main(int argc, char *argv[])
{
double x = 1.0; double y = 1.0;
acosh(x); asinh(x); atanh(x);
expm1(x);
erf(x); erfc(x);
// finite(x);
isnan(x);
j0(x); j1(x);
lgamma(x);
logb(x); log1p(x);
rint(x);
// trunc(x);
y0(x); y1(x);
return 0;
}
")
CHECK_CXX_SOURCE_COMPILES("${_CHECK_IEEE_MATH_SOURCE_CODE}" ${_RESULT})
ENDMACRO (CHECK_IEEE_MATH)