[cmake-developers] Apple tests for target_link_libraries failing

Stephen Kelly steveire at gmail.com
Tue Oct 11 02:33:13 EDT 2011


Hi,

I'm trying to find out why the target_link_libraries unit tests are failing 
on some platforms (but not mine...). I'm enabling one platform at a time. I 
enabled the failing tests for APPLE, so if you want to try it out, you need 
to comment out the if(APPLE).

http://www.cdash.org/CDash/testDetails.php?test=118643411&build=1613858

The executable in both failing tests is linking to libraries A, B and C, so 
the executable builds successfully therefore failing the test.

On my system it correctly links the application to libraries A and C only in 
one of the tests, therefore symbols from library B are not found, and the 
build fails as expected.
 
153: 
153:   Linking CXX executable exec
153: 
153:   /home/stephen/dev/build/qt48/cmake/bin/cmake -E cmake_link_script
153:   CMakeFiles/exec.dir/link.txt --verbose=1
153: 
153:   /usr/lib/icecc/bin/c++ CMakeFiles/exec.dir/main.cpp.o -o exec -
rdynamic
153:   
/home/stephen/dev/build/qt48/cmake/Tests/CMakeCommands/target_link_libraries/libs_build_True_True/liblibC.so
153:   
/home/stephen/dev/build/qt48/cmake/Tests/CMakeCommands/target_link_libraries/libs_build_True_True/liblibA.so
153:   -Wl,-
rpath,/home/stephen/dev/build/qt48/cmake/Tests/CMakeCommands/target_link_libraries/libs_build_True_True
153:   -Wl,-rpath-
link,/home/stephen/dev/build/qt48/cmake/Tests/CMakeCommands/target_link_libraries/libs_build_True_True
153: 
153: 
153:   CMakeFiles/exec.dir/main.cpp.o:main.cpp:function main: error: 
undefined
153:   reference to 'classB::classB()'
153: 


Can someone with an apple find out what is causing the B library to appear 
in the link line on APPLE, but not on my system? I can't fix the test 
because I have no apple.

Thanks,

Steve.




More information about the cmake-developers mailing list