It's something more than just this simple example... I've tried it with CMake 2.4.5, 2.4.7 and today's CVS CMake and it does not happen on my machine. (The Debug C always properly links to Ad only, not also to A...)
<br><br>I am using VS 2005 standard edition.<br><br>The problem was occurring on the ParaView3 dashboards (until I masked it out by mucking with CXX_FLAGS last Friday) on morva and minastirith dashboards. Here&#39;s an example: 
<a href="http://www.paraview.org/ParaView3/Testing/Sites/morva.kitware/Win32-vs8/20071207-0100-Nightly/BuildWarning.html">http://www.paraview.org/ParaView3/Testing/Sites/morva.kitware/Win32-vs8/20071207-0100-Nightly/BuildWarning.html
</a><br><br>morva is using CMake 2.4.5 and VS8 Professional edition, minastirith is using CMake 2.4.7 and VS8 Standard edition.<br><br>Any other clues about what additional steps / settings might be required to trigger this error condition?
<br><br><br><div><span class="gmail_quote">On 12/10/07, <b class="gmail_sendername"><a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a></b> &lt;<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>&gt; wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Can this be fixed for 2.4.8?&nbsp;&nbsp;It looks like it was already fixed for 2.6, but<br>
I couldn&#39;t find a bug report for it.<br><br>=================================================<br>ADD_LIBRARY(A a.c)<br>ADD_LIBRARY(Ad a.c)<br><br>ADD_LIBRARY(B b.c)<br>TARGET_LINK_LIBRARIES(B debug Ad optimized A)<br>
# if building shared libs, cmake correctly links B with -lAd OR -lA<br><br>ADD_EXECUTABLE(C c.c)<br>TARGET_LINK_LIBRARIES(C B)<br># cmake incorrectly links C with -lB -lAd -lA if build type is Debug<br>===================================================
<br><br>Clint<br><br><br>On Wednesday 05 December 2007 3:13:39 pm Bill Hoffman wrote:<br>&gt; I have a beta release for 2.4.8 ready for cmake.&nbsp;&nbsp;This will be the last<br>&gt; release of the 2.4.X branch.&nbsp;&nbsp;The next release will be 
2.6.0.&nbsp;&nbsp;So,<br>&gt; please make sure you test it if you are interested in a 2.4.8.&nbsp;&nbsp;Send any<br>&gt; issues to me or the cmake list.&nbsp;&nbsp;Thanks.<br>&gt;<br>&gt; The files can be found here:<br>&gt;<br>&gt; <a href="http://www.cmake.org/files/v2.4/*RC-4*">
http://www.cmake.org/files/v2.4/*RC-4*</a><br>&gt;<br>&gt;<br>&gt; The changes from 2.4.7 are as follows:<br>&gt;<br>&gt; Changes in CMake 2.4.8 RC 4<br>&gt; * fix for cpack and messing up PATH with NSIS<br>&gt; Changes in CMake 
2.4.8 RC 3<br>&gt; * fix for bug 5363: GET_TARGET_PROPERTY(... DEBUG_LOCATION)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;returns value containing $(OutDir)<br>&gt; * Better error from ctest if nightly time not set<br>&gt; * Fix for exception handling flags in VS 2003 and up
<br>&gt; * Avoid relinking exclude-from-all directory targets before install<br>&gt; Changes in CMake 2.4.8 RC 2<br>&gt; * fix for bug 5590 relative paths in windows not working across drives<br>&gt; * fix warning/error with TAR_VERBOSE flag
<br>&gt; Changes in CMake 2.4.8 RC 1<br>&gt; * Fix for kde4-config location<br>&gt; * Fix for self extracting .sh files on solaris<br>&gt; * Remove KDE3_ENABLE_FINAL (did not work)<br>&gt; * KDE3 fix for 64 bit location of plugins
<br>&gt; * mark PYTHON_EXECUTABLE as advanced<br>&gt; * Fix for version numbers on NetBSD<br>&gt; * Add more search directories (install prefix and cmake location)<br>&gt; * include WindowsPaths in Windows.cmake not just 
Windows-cl.cmake<br>&gt; * documentation fix for file, find_package, try_run<br>&gt; * add IS_ABSOLUTE to if<br>&gt; * INSTALL() everything which doesn&#39;t have a COMPONENT set, is assigned<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;to the COMPONENT &quot;Unspecified&quot;
<br>&gt; * make #cmakedefine output match autoconf when undefined<br>&gt; * document cmake remove -f<br>&gt; * document order of -D and -P<br>&gt; * add support for DragonFly and GNU hurd<br>&gt; * fix for fortran depends doing too many scans
<br>&gt; _______________________________________________<br>&gt; CMake mailing list<br>&gt; <a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake
</a><br><br><br>_______________________________________________<br>CMake mailing list<br><a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake
</a><br></blockquote></div><br>