summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
diff options
context:
space:
mode:
authorSumit Bhardwaj <bhardwajs@outlook.com>2022-07-16 06:52:27 (GMT)
committerBrad King <brad.king@kitware.com>2022-07-20 12:51:38 (GMT)
commit7219988b006eb0b2fd52ab0ab3a38178a2e14c80 (patch)
tree089bf877f4ec1a096f8e9d1c204c80270ee4f3d8 /Source/cmGlobalVisualStudio10Generator.cxx
parent9d9c09b3df784b9ea8dd1f576bfb379bc3772391 (diff)
downloadCMake-7219988b006eb0b2fd52ab0ab3a38178a2e14c80.zip
CMake-7219988b006eb0b2fd52ab0ab3a38178a2e14c80.tar.gz
CMake-7219988b006eb0b2fd52ab0ab3a38178a2e14c80.tar.bz2
VS: Exclude ZERO_CHECK.proj from .sln for include_external_msproject
In `cmGlobalVisualStudio7Generator::WriteTargetsToSolution`, we skip writing `ZERO_CHECK.proj` to solution file as the check in `cmGlobalVisualStudioGenerator::IsInSolution` returns `false` for `ZERO_CHECK`. However, we write ZERO_CHECK to ProjectDependencies for external projects as there are no checks in `cmGlobalVisualStudio71Generator::WriteExternalProject`. Similar to `cmGlobalVisualStudioGenerator::IsInSolution`, we introduce `IsDepInSolution(const std::string&)` which excludes `ZERO_CHECK.proj` from being added to sln file for the cases where we have `ZERO_CHECK.proj`. Fixes: #23708
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 155efde..dec0858 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -1294,6 +1294,14 @@ bool cmGlobalVisualStudio10Generator::IsInSolution(
gt->GetName() == CMAKE_CHECK_BUILD_SYSTEM_TARGET);
}
+bool cmGlobalVisualStudio10Generator::IsDepInSolution(
+ const std::string& targetName) const
+{
+ return !targetName.empty() &&
+ !(this->Version >= cmGlobalVisualStudioGenerator::VSVersion::VS16 &&
+ targetName == CMAKE_CHECK_BUILD_SYSTEM_TARGET);
+}
+
bool cmGlobalVisualStudio10Generator::Find64BitTools(cmMakefile* mf)
{
if (this->DefaultPlatformToolset == "v100") {