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

34
cmake/CheckSysvMath.cmake Normal file
View File

@@ -0,0 +1,34 @@
INCLUDE(CheckCXXSourceCompiles)
MACRO (CHECK_SYSV_MATH _RESULT)
SET(_CHECK_SYSV_MATH_SOURCE_CODE "
#include<cmath>
int main(int argc, char *argv[])
{
double x = 1.0; double y = 1.0;
_class(x);
ilogb(x);
itrunc(x);
nearest(x);
rsqrt(x);
uitrunc(x);
copysign(x,y);
drem(x,y);
fmod(x,y);
hypot(x,y);
nextafter(x,y);
remainder(x,y);
scalb(x,y);
unordered(x,y);
return 0;
}
")
CHECK_CXX_SOURCE_COMPILES("${_CHECK_SYSV_MATH_SOURCE_CODE}" ${_RESULT})
ENDMACRO (CHECK_SYSV_MATH)