summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorMariusz PluciƄski <mplucinski@mplucinski.com>2016-02-18 00:06:52 (GMT)
committerBrad King <brad.king@kitware.com>2016-03-10 14:11:39 (GMT)
commit2c2ec4883bd9829b3589ce0aebe466bae9e8b0e9 (patch)
tree79ca3119beb5ff5401860d448c386f124b49a3d6 /Source/cmVisualStudio10TargetGenerator.cxx
parent37afe00faad5cb64e666640526bdc6b5d224b853 (diff)
downloadCMake-2c2ec4883bd9829b3589ce0aebe466bae9e8b0e9.zip
CMake-2c2ec4883bd9829b3589ce0aebe466bae9e8b0e9.tar.gz
CMake-2c2ec4883bd9829b3589ce0aebe466bae9e8b0e9.tar.bz2
VS: in Clang/C2 toolset, setup correct compiler settings
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 27a01a3..31873b5 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2078,7 +2078,18 @@ void cmVisualStudio10TargetGenerator::WriteClOptions(
if(this->MSTools)
{
- this->WriteString("<ObjectFileName>$(IntDir)</ObjectFileName>\n", 3);
+ cmsys::RegularExpression clangToolset("v[0-9]+_clang_.*");
+ const char* toolset = this->GlobalGenerator->GetPlatformToolset();
+ if (toolset && clangToolset.find(toolset))
+ {
+ this->WriteString("<ObjectFileName>"
+ "$(IntDir)%(filename).obj"
+ "</ObjectFileName>\n", 3);
+ }
+ else
+ {
+ this->WriteString("<ObjectFileName>$(IntDir)</ObjectFileName>\n", 3);
+ }
// If not in debug mode, write the DebugInformationFormat field
// without value so PDBs don't get generated uselessly.