summaryrefslogtreecommitdiffstats
path: root/Tests/Tutorial/Step6
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-10-31 15:35:07 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-10-31 15:35:07 (GMT)
commit0b8db9ced19bf6ef3fa8a23625b47a7f9bdfdd4e (patch)
tree78f6e599f593d6fe6e746c5b56e7182253578091 /Tests/Tutorial/Step6
parentf2805bd01b011604f95f384ce1759c15503d32cc (diff)
parent609037f4821c45ed13029074c8669d52c6dc9d71 (diff)
downloadCMake-0b8db9ced19bf6ef3fa8a23625b47a7f9bdfdd4e.zip
CMake-0b8db9ced19bf6ef3fa8a23625b47a7f9bdfdd4e.tar.gz
CMake-0b8db9ced19bf6ef3fa8a23625b47a7f9bdfdd4e.tar.bz2
Merge topic 'ExternalProject_CMAKE_CACHE_DEFAULT_ARGS'
609037f4 ExternalProject: Add unit tests for CMAKE_CACHE_DEFAULT_ARGS 98cdb658 ExternalProject: Add CMAKE_CACHE_DEFAULT_ARGS arguments 36cf8a1e Tests/Tutorial: Fix when USE_MYMATH is OFF
Diffstat (limited to 'Tests/Tutorial/Step6')
-rw-r--r--Tests/Tutorial/Step6/tutorial.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Tests/Tutorial/Step6/tutorial.cxx b/Tests/Tutorial/Step6/tutorial.cxx
index 82b416f..c27da0b 100644
--- a/Tests/Tutorial/Step6/tutorial.cxx
+++ b/Tests/Tutorial/Step6/tutorial.cxx
@@ -21,12 +21,16 @@ int main (int argc, char *argv[])
}
double inputValue = atof(argv[1]);
+ double outputValue = 0;
+ if(inputValue >= 0)
+ {
#ifdef USE_MYMATH
- double outputValue = mysqrt(inputValue);
+ outputValue = mysqrt(inputValue);
#else
- double outputValue = sqrt(inputValue);
+ outputValue = sqrt(inputValue);
#endif
+ }
fprintf(stdout,"The square root of %g is %g\n",
inputValue, outputValue);