summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorSumit Bhardwaj <bhardwajs@outlook.com>2022-02-04 21:03:51 (GMT)
committerBrad King <brad.king@kitware.com>2022-02-12 17:09:09 (GMT)
commit11b8366e55e13661854fc9ecb33efbe0863ae0e7 (patch)
tree11230e41b8de572e1046c5575fefb1de507c9125 /Source/cmGlobalVisualStudioGenerator.cxx
parent0682cd36571e8a3c78c6425e9a56647880d8d28b (diff)
downloadCMake-11b8366e55e13661854fc9ecb33efbe0863ae0e7.zip
CMake-11b8366e55e13661854fc9ecb33efbe0863ae0e7.tar.gz
CMake-11b8366e55e13661854fc9ecb33efbe0863ae0e7.tar.bz2
VS: Introduce IsInSolution to check whether a target is in sln file
Previously, different versions of VS Generators checked whether a target was in .sln file or not by checking whether the target was to be written to build system or not. As we move `ZERO_CHECK.vcxproj` to `.proj`, we want to exclude those files from being written to `.sln` files too. This commit introduces `IsInSolution()` at `cmGlobalVisualStudioGenerator` level which can be customized at specific versioned Generator when needed.
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 141b5eb..cddaaa4 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -837,6 +837,12 @@ bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly(
return languages.size() == 1 && *languages.begin() == "Fortran";
}
+bool cmGlobalVisualStudioGenerator::IsInSolution(
+ const cmGeneratorTarget* gt) const
+{
+ return gt->IsInBuildSystem();
+}
+
bool cmGlobalVisualStudioGenerator::TargetCompare::operator()(
cmGeneratorTarget const* l, cmGeneratorTarget const* r) const
{