[cmake-developers] CheckSymbolExists is unreliable

Rolf Eike Beer eike at sf-mail.de
Fri Jan 6 13:55:10 EST 2012


Brad King wrote:
> On 1/5/2012 8:25 AM, Brad King wrote:
> >> So I will go and fix some small typos I've found in the existing
> >> tests,
> >> repush and merge to next, so we see if Check*SymbolExists will work.
> > 
> > Sounds good.

> However the CheckCXXSymbolExist test fails:
>   
> http://www.cdash.org/CDash/testSummary.php?project=1&name=CheckCXXSymbolExi
> sts&date=2012-01-06
> 
> I think it is because of a leftover --debug-trycompile option in the test
> line. That option works only when a single try-compile is invoked.

I've removed this. There is also a second problem: some builds (like bcc55) 
failed only because they could not find errno in <errno.h>. I've changed the 
C++ test to check in <cerrno> first, which seems to have fixed at least the 
bcc55 continuous build.

> Also, the tests are currently added differently from the other tests and are
> not handled by our "make test_clean" target.  Furthermore the tests only
> get cleaned up by the file(REMOVE...) code in their CMakeLists.txt files
> when the main CMake build tree re-configures.
> 
> Please change the way the tests are added to be consistent with the
> Module.CheckTypeSize test.  IOW most of what is currently CMakeLists.txt.in
> can just go in CMakeLists.txt and the directory should not have its own
> add_test call.

The difference is that my test only does configuration and does not build an 
executable, so the --build-and-test stuff will not work.

> If you want to ensure that the try-compiles always re-run
> then add a line like
> 
>    unset(CSE_RESULT_... CACHE)
> 
> just before each call to a check macro.

Done.

I see that there are submit errors like this:

(SendEmail): User: Rolf Eike Beer is not registered (or has no email) for the 
project 1

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120106/3c22c5c4/attachment.sig>


More information about the cmake-developers mailing list