Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex Ghosh
CMake
Commits
15ad6db1
Commit
15ad6db1
authored
Jun 15, 2009
by
Bill Hoffman
Browse files
BUG: fix crash when running ctest coverage for VTK
parent
dbc4e2f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/CTest/cmCTestBuildAndTestHandler.cxx
View file @
15ad6db1
...
...
@@ -159,6 +159,14 @@ void CMakeStdoutCallback(const char* m, int len, void* s)
std
::
string
*
out
=
(
std
::
string
*
)
s
;
out
->
append
(
m
,
len
);
}
struct
cmSetupOutputCaptureCleanup
{
~
cmSetupOutputCaptureCleanup
()
{
cmSystemTools
::
SetErrorCallback
(
0
,
0
);
cmSystemTools
::
SetStdoutCallback
(
0
,
0
);
}
};
//----------------------------------------------------------------------
int
cmCTestBuildAndTestHandler
::
RunCMakeAndTest
(
std
::
string
*
outstring
)
...
...
@@ -167,6 +175,10 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
std
::
string
cmakeOutString
;
cmSystemTools
::
SetErrorCallback
(
CMakeMessageCallback
,
&
cmakeOutString
);
cmSystemTools
::
SetStdoutCallback
(
CMakeStdoutCallback
,
&
cmakeOutString
);
// make sure SetStdoutCallback and SetErrorCallback are set to null
// after this function exits so that they do not point at a destroyed
// string cmakeOutString
cmSetupOutputCaptureCleanup
cleanup
;
cmOStringStream
out
;
// if the generator and make program are not specified then it is an error
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment