diff options
author | Brad King <brad.king@kitware.com> | 2016-03-10 14:16:16 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-03-10 14:16:16 (GMT) |
commit | 612a8b3bd8091372d9e50a81f05dcab8b31ae35c (patch) | |
tree | c6978e8f12830b4cab6f484d276ec447621072eb /Source | |
parent | e1b0dedc69a7d6eecaf1fe1d2324434aaac67c74 (diff) | |
parent | 491b41dd988915a3f00259fa704490dfa2f47dc9 (diff) | |
download | CMake-612a8b3bd8091372d9e50a81f05dcab8b31ae35c.zip CMake-612a8b3bd8091372d9e50a81f05dcab8b31ae35c.tar.gz CMake-612a8b3bd8091372d9e50a81f05dcab8b31ae35c.tar.bz2 |
Merge topic 'vs-clang-cl'
491b41dd Help: Add notes for topic 'vs-clang-cl'
ad6d27ac Tests: do not build PrecompiledHeader on Clang/C2
a0f0541f Tests: fix PDBDirectoryAndName on Clang/C2
3541af67 Tests: fix Plugin building on Clang/C2
1902c293 Tests: fix complexOneConfig building on Clang/C2
cab2ec11 Tests: fix Complex building on Clang/C2
ada3736c Tests: fix Module.GenerateExportHeader building on Clang/C2
123b7e13 Tests: fix AliasTarget building on Clang/C2
445d4d4b VS 14: Add flag map for -std= to CppLanguageStandard tag in project files
0a785eb4 Features: Clang has no cxx_decltype_incomplete_return_type in MSVC sim mode
2c2ec488 VS: in Clang/C2 toolset, setup correct compiler settings
37afe00f CMakeDetermineCompilerId: Add detection of clang.exe bundled with VS
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmVS14CLFlagTable.h | 20 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 13 |
2 files changed, 32 insertions, 1 deletions
diff --git a/Source/cmVS14CLFlagTable.h b/Source/cmVS14CLFlagTable.h index 422f47b..173f624 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", @@ -172,6 +174,24 @@ static cmVS7FlagTable cmVS14CLFlagTable[] = {"CompileAsManaged", "clr:oldSyntax", "Common Language RunTime Support, Old Syntax", "OldSyntax", 0}, + {"CppLanguageStandard", "", + "Default", "Default", 0}, + {"CppLanguageStandard", "std=c++98", + "C++03", "c++98", 0}, + {"CppLanguageStandard", "std=c++11", + "C++11", "c++11", 0}, + {"CppLanguageStandard", "std=c++1y", + "C++14", "c++1y", 0 }, + {"CppLanguageStandard", "std=c++14", + "C++14", "c++1y", 0 }, + {"CppLanguageStandard", "std=gnu++98", + "C++03 (GNU Dialect)", "gnu++98", 0}, + {"CppLanguageStandard", "std=gnu++11", + "C++11 (GNU Dialect)", "gnu++11", 0}, + {"CppLanguageStandard", "std=gnu++1y", + "C++14 (GNU Dialect)", "gnu++1y", 0}, + {"CppLanguageStandard", "std=gnu++14", + "C++14 (GNU Dialect)", "gnu++1y", 0}, //Bool Properties {"CompileAsWinRT", "ZW", "", "true", 0}, 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. |