summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-04 19:51:08 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-09 14:59:53 (GMT)
commit2b3e7b6f943d525cd02c13daacd596f17d100fd4 (patch)
treeae7900dc6243377de0a7a535b411ab55f7dff6da
parent39af06e7f78863861ba7f8e85c511fb557412ff0 (diff)
downloadCMake-2b3e7b6f943d525cd02c13daacd596f17d100fd4.zip
CMake-2b3e7b6f943d525cd02c13daacd596f17d100fd4.tar.gz
CMake-2b3e7b6f943d525cd02c13daacd596f17d100fd4.tar.bz2
VS: Fix vcxproj specification of empty output file extension
When a binary output file is to have no extension, the TargetExt element in the vcxproj cannot be left empty because VS will choose a default extension. Instead use "." because the Windows filesystem will treat that as an empty extension.
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 12f60eb..453e983 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1277,6 +1277,12 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
std::string ext =
cmSystemTools::GetFilenameLastExtension(targetNameFull);
+ if(ext.empty())
+ {
+ // An empty TargetExt causes a default extension to be used.
+ // A single "." appears to be treated as an empty extension.
+ ext = ".";
+ }
this->WritePlatformConfigTag("TargetExt", config->c_str(), 3);
*this->BuildFileStream << cmVS10EscapeXML(ext) << "</TargetExt>\n";