[CMake] VS2010 TargetName fix

David Cole david.cole at kitware.com
Wed Oct 6 13:17:13 EDT 2010


Robert,

Thanks for your email (and your previous report of the same issue...)

It was fixed on Sept. 6 with this commit:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=530ade6677ec2c12fe8f3db5f5d71ad0ffaa9e68

The fix is available for testing in the just now released CMake 2.8.3-rc2
release candidate. (It was also in rc1 3 weeks ago, but try the new one
today...)

Please give it a try and let us know that it fixes the issue for you.
Several other VS10 related issues have also been addressed.


Thanks,
David Cole


On Wed, Oct 6, 2010 at 10:10 AM, Robert Goulet
<Robert.Goulet at autodesk.com>wrote:

>  Hello folks,
>
>
>
> I would like to submit a patch to the Visual Studio 2010 generator, about
> the property TargetName. The issue is with target names that contain more
> than one dot in it. For example, if your project target name is
> “hello-10.2.3.dll” then TargetName get set to “hello-10”. It should have
> been set to “hello-10.2.3”.
>
>
>
> I propose the following fix:
>
>
>
> cmVisualStudio10TargetGenerator.cxx : around line 841
>
>
>
>      ...
>
>      this->WritePlatformConfigTag("IntDir", config->c_str(), 3);
>
>      *this->BuildFileStream << intermediateDir
>
>                             << "</IntDir>\n";
>
>      this->WritePlatformConfigTag("TargetName", config->c_str(), 3);
>
> +    *this->BuildFileStream <<
> cmSystemTools::GetFilenameWithoutLastExtension(
>
>        targetNameFull.c_str())
>
>                             << "</TargetName>\n";
>
>      ...
>
>
>
> Very quick fix, I simply changed GetFilenameWithoutExtension() for
> GetFilenameWithoutLastExtension().
>
>
>
> Thank you!
>
>
>
> * *
>
> * *
>
> *Robert Goulet*
>
> Software Development Manager
>
> Autodesk Media & Entertainment
>
>
>
> Autodesk, Inc.
>
> 10 Duke
>
> Montreal, QC H3C 2L7
>
>
>
> Direct 514 954-3911
>
>
>
> [image: Adsk_logo_4_sig_v03_crop.gif]
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101006/23410853/attachment.htm>


More information about the CMake mailing list