summaryrefslogtreecommitdiff
path: root/Source/cmGlobalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorMichael Stürmer <michael.stuermer@schaeffler.com>2016-09-23 12:15:40 +0200
committerBrad King <brad.king@kitware.com>2016-10-19 11:14:16 -0400
commit4f78b9ff2df89d5b4104f92251feb0a7f0976d7f (patch)
tree9f17e2ab318d8eb876674f746ba0b470fadd13ee /Source/cmGlobalVisualStudioGenerator.cxx
parent0de6a404aafb497074980eba5144d243b6868d68 (diff)
downloadcmake-4f78b9ff2df89d5b4104f92251feb0a7f0976d7f.tar.gz
VS: Add CSharp project uuid and file extension
This is in preparation for adding CSharp language support to the VS generator.
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 6296dd2632..b277391be2 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -734,6 +734,27 @@ bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly(
return false;
}
+bool cmGlobalVisualStudioGenerator::TargetIsCSharpOnly(
+ cmGeneratorTarget const* gt)
+{
+ // check to see if this is a C# build
+ std::set<std::string> languages;
+ {
+ // Issue diagnostic if the source files depend on the config.
+ std::vector<cmSourceFile*> sources;
+ if (!gt->GetConfigCommonSourceFiles(sources)) {
+ return false;
+ }
+ }
+ gt->GetLanguages(languages, "");
+ if (languages.size() == 1) {
+ if (*languages.begin() == "CSharp") {
+ return true;
+ }
+ }
+ return false;
+}
+
bool cmGlobalVisualStudioGenerator::TargetCompare::operator()(
cmGeneratorTarget const* l, cmGeneratorTarget const* r) const
{