[CMake] ctest ques.: capture driver errs
Dean Inglis
dean.inglis at sympatico.ca
Tue Sep 19 17:14:08 EDT 2006
I have a build similar to VTK/Examples/Build/vtkMy
and I have added ctest funtionality to test my custom
VTK classes. In a test driver that evaluates numeric
expressions, e.g. a stupid ex.:
in myTest(int,char*[])
{
int a =1;
int b = 2;
int retVal = 0;
if((a + b) != 500)
{
vtkGenericWarningMacro(<<"err: a + b != 500, a = " << a<<", b = " << b);
retVal = 1;
}
return retVal;
}
I want to retrieve some form of diagnostic message either at console
or to a log file. Is there a way to do this with cmake/ctest or do
I have to explicitly write out my error diagnostics to a file?
Replacing vtkGenericWarningMacro( with cout does not pipe output
to the console: ctest prevents this.
Dean
More information about the CMake
mailing list