[cmake-developers] ctest not detecting error when clang fails to link
Brad King
brad.king at kitware.com
Thu Mar 8 15:38:09 EST 2012
On 3/8/2012 3:34 PM, Alexandru Ciobanu wrote:
> We found a scenario when when ctest does not detect a build error.
>
> This occurs when clang is invoked as a linker and one of the libraries is not found:
>
> /Developer/usr/bin/clang++ -LDIR1 -LDIR2 -lib1 -lib2 -lib3 [...] -o MyApp
> ld: library not found for -lprofile_rt
> Command /Developer/usr/bin/clang++ failed with exit code 1
>
> The two lines printed after this invocation are not matched by any of the regular expressions defined in Source/CTest/cmCTestBuildHandler.cxx
>
> So, in our case, we have an incomplete build, and the error is not reported to the dashboard.
>
> I think lines matching "clang\+* failed with exit code" should be considered errors and reported as such.
Yes. Please format a patch for cmCTestBuildHandler.cxx to update
cmCTestErrorMatches accordingly.
Meanwhile you can probably work around this by adding the regex to
CTEST_CUSTOM_ERROR_MATCH in CTestCustom at the top of the project.
Alternatively you should be able to run the dashboards with the
CTEST_USE_LAUNCHERS option. For Makefile builds it instruments
the compiler and linker invocations and checks the return code
and looks at output on stderr.
-Brad
More information about the cmake-developers
mailing list