[cmake-developers] Linking projects with no C or CPP files
Brad King
brad.king at kitware.com
Thu Sep 12 15:32:43 EDT 2013
On 09/12/2013 03:08 PM, James Bigler wrote:
> In 2.8.12 and 2.8.11.2 I noticed the following problem for VS 2012 builds.
> VS 2010 builds are fine. Also CMake 2.8.10.1 works just fine.
>
> VS 2012 doesn't link the objects into a library.
[snip]
> Broken project:
> <LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkObjects>
>
> In the working case this isn't in there at all.
I suspect this change is related:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b684b395
It was added in 2.8.11 and is specific to VS >= 11. It adds the
LinkObjects element inside custom commands to tell VS not to link
the custom command output by default.
However, if the object has EXTERNAL_OBJECT set then there should
be a separate <Object> entry for it that tells VS to link it in.
-Brad
More information about the cmake-developers
mailing list