[cmake-developers] INTERFACE_LINK_LIBRARIES property?

Brad King brad.king at kitware.com
Tue Jul 2 08:54:11 EDT 2013


On 06/27/2013 06:42 PM, Stephen Kelly wrote:
> Brad King wrote:
>> The current topic looks pretty good and I will perform more
>> testing soon.
> 
> Sounds good! I'll test it more too.

Thanks for cleaning up the initial dashboard trouble.  There
is one lingering problem in VS 6:

 http://open.cdash.org/testDetails.php?test=193818480&build=2953898
 bar.obj : error LNK2001: unresolved external symbol "int __cdecl bang(void)" (?bang@@YAHXZ)
 ...\Tests\InterfaceLinkLibraries\Release/bar_shared.dll : fatal error LNK1120: 1 unresolved externals

I don't think there is anything wrong with your code.  The problem
is that VS 6 does not support per-target objects so the re-use of
some of the source files in multiple targets results in only one
object file so the different preprocessing behavior you expect does
not work.

A few other tests have had the same problem.  What we do to work
around it is add sources like foo_vs6_1.cpp and foo_vs6_2.cpp
that contain just

 #include "foo.cpp"

and use them in place of foo.cpp in each target for the VS 6 gen.
This ensures a separate object file name for each target in the test.

Thanks,
-Brad



More information about the cmake-developers mailing list