diff --git a/modules/find/FindM.cmake b/modules/find/FindM.cmake index cfbe690170666e99a8f662f201d1146e9dc29c91..5abbd485243bf109de35e0258c3975a9e1ff8a63 100644 --- a/modules/find/FindM.cmake +++ b/modules/find/FindM.cmake @@ -38,8 +38,7 @@ include(FindPackageHandleStandardArgs) # check that we can call math directly with the compiler include(CheckCSourceCompiles) -set(LIBM_TEST_SOURCE "#include<math.h>\nfloat f; int main(){sqrt(f);return -0;}") +set(LIBM_TEST_SOURCE "#include<math.h>\nfloat f; int main(){float s=sqrt(f);return 0;}") check_c_source_compiles("${LIBM_TEST_SOURCE}" HAVE_MATH) # if works with the compiler we do not need anything else, variables are empty @@ -81,4 +80,4 @@ else() endif() endif() -endif() \ No newline at end of file +endif()