[cmake-developers] Linking projects with no C or CPP files
James Bigler
jamesbigler at gmail.com
Thu Sep 12 15:08:55 EDT 2013
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. It fails to run the link
command at all. I'm trying to figure out why. I'm comparing the
differences between the generated project files, and this is some of the
differences.
Broken project:
<LinkObjects
Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkObjects>
In the working case this isn't in there at all.
In the working case there is also lots of stuff relating to compiling C
such as the following that are not present in the broken case:
<LinkIncremental>true</LinkIncremental>
<StackReserveSize>10000000</StackReserveSize>
<AdditionalOptions> /Zm1000 %(AdditionalOptions)</AdditionalOptions>
<ProgramDataBaseFileName>C:/code/FindCUDA/build-vs11-c55-cm2.8.10.1/src/RelWithDebInfo/test_lib.pdb</ProgramDataBaseFileName>
In order to work around the problem of CMake not knowing what kind of C or
C++ project it was in the past, I added the following lines to the target
where CUDA_C_OR_CXX is CXX in this case.
set_target_properties(${cuda_target}
PROPERTIES
LINKER_LANGUAGE ${CUDA_C_OR_CXX}
)
Did this property somehow not stick for VS 2012?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20130912/e4700096/attachment.html>
More information about the cmake-developers
mailing list