summaryrefslogtreecommitdiffstats
path: root/Source
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
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')
-rw-r--r--Source/cmVS14CLFlagTable.h2
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx13
2 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmVS14CLFlagTable.h b/Source/cmVS14CLFlagTable.h
index 422f47b..1c9cf7c 100644
--- a/Source/cmVS14CLFlagTable.h
+++ b/Source/cmVS14CLFlagTable.h
@@ -28,6 +28,8 @@ static cmVS7FlagTable cmVS14CLFlagTable[] =
"Custom", "Custom", 0},
{"Optimization", "Od",
"Disabled", "Disabled", 0},
+ {"Optimization", "Os",
+ "Minimize Size", "MinSize", 0},
{"Optimization", "O1",
"Minimize Size", "MinSpace", 0},
{"Optimization", "O2",
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.