summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-20 12:51:24 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-10-20 12:51:24 (GMT)
commit7aa9961939f99c915485d86e460b9941f949d59c (patch)
tree93d61b5dc2cb49a6e1172aa499d9df986e35ced1 /Source/cmGlobalVisualStudioGenerator.cxx
parentfc7ecd6b0570d91a31221203e4bbaf7e48006662 (diff)
parentf27492a4db2c56f334b2ca5c746b01b8e9a04995 (diff)
downloadCMake-7aa9961939f99c915485d86e460b9941f949d59c.zip
CMake-7aa9961939f99c915485d86e460b9941f949d59c.tar.gz
CMake-7aa9961939f99c915485d86e460b9941f949d59c.tar.bz2
Merge topic 'vs-csharp-prep'
f27492a4 VS: Add internal API for detecting "managed" projects 4f78b9ff VS: Add CSharp project uuid and file extension
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 0782182..67c355b 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -736,6 +736,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
{