diff options
author | Brad King <brad.king@kitware.com> | 2002-12-11 19:15:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-12-11 19:15:35 (GMT) |
commit | 3bcbca96ab7424852e1cc4e15ef19174e40db224 (patch) | |
tree | d928862a6adb8a861348895c5ca73c8e94d28aec /Source/cmSystemTools.cxx | |
parent | 682e2c7b8b614b595dcff32ffe24d67a5e26ff54 (diff) | |
download | CMake-3bcbca96ab7424852e1cc4e15ef19174e40db224.zip CMake-3bcbca96ab7424852e1cc4e15ef19174e40db224.tar.gz CMake-3bcbca96ab7424852e1cc4e15ef19174e40db224.tar.bz2 |
ENH: Improved implementation of MSVC debug hook to only add the hook if DART_TEST_FROM_DART is set in the environment. This is better than always adding the hook and testing the environment from the callback.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 7750349..ff27805 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2434,16 +2434,16 @@ void cmSystemTools::SplitProgramFromArgs(const char* path, # include <stdlib.h> static int cmSystemToolsDebugReport(int, char* message, int*) { - if(getenv("DART_TEST_FROM_DART")) - { - fprintf(stderr, message); - exit(1); - } + fprintf(stderr, message); + exit(1); return 0; } void cmSystemTools::EnableMSVCDebugHook() { - _CrtSetReportHook(cmSystemToolsDebugReport); + if(getenv("DART_TEST_FROM_DART")) + { + _CrtSetReportHook(cmSystemToolsDebugReport); + } } #else void cmSystemTools::EnableMSVCDebugHook() |