summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeRCCompiler.cmake.in
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <daniele.domenichelli@iit.it>2014-10-30 11:23:27 (GMT)
committerBrad King <brad.king@kitware.com>2014-10-31 15:32:24 (GMT)
commit36cf8a1eb9eaa6d01a434d007f707be972e6e383 (patch)
tree2d758e3bd6ee68983c3a64de834b2b891ba75421 /Modules/CMakeRCCompiler.cmake.in
parent5c5c1e3c7dee614ab108a8809507a907a629a9d3 (diff)
downloadCMake-36cf8a1eb9eaa6d01a434d007f707be972e6e383.zip
CMake-36cf8a1eb9eaa6d01a434d007f707be972e6e383.tar.gz
CMake-36cf8a1eb9eaa6d01a434d007f707be972e6e383.tar.bz2
Tests/Tutorial: Fix when USE_MYMATH is OFF
Unit tests for the square root of "-25" currently fail when USE_MYMATH is disabled. The "mysqrt" method in the tutorials, returns "0" for a negative value, while "sqrt" returns "NaN", and therefore the output is not accepted by the test. This patch checks if the number is negative and eventually returns "0" before calling "sqrt" or "mysqrt" to fix this issue. Printing a NaN might cause issues with the string catched by the tests on some platform. Therefore assume that "0" is correct and "fix" the USE_MYMATH=OFF version by checking if the number is negative and eventually returning "0" before calling "sqrt" or "mysqrt".
Diffstat (limited to 'Modules/CMakeRCCompiler.cmake.in')
0 files changed, 0 insertions, 0 deletions