summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-07-20 13:24:56 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-07-20 13:25:11 (GMT)
commitdb66f1fede2842c4333bcde659874bdfc7da5bc2 (patch)
tree8954072b6e57981953a50c23be9c2705bdf1f558 /Source
parent57e30ac9446b6a0adcc285e7e69646deed3b9300 (diff)
parent7219988b006eb0b2fd52ab0ab3a38178a2e14c80 (diff)
downloadCMake-db66f1fede2842c4333bcde659874bdfc7da5bc2.zip
CMake-db66f1fede2842c4333bcde659874bdfc7da5bc2.tar.gz
CMake-db66f1fede2842c4333bcde659874bdfc7da5bc2.tar.bz2
Merge topic 'vs-ZERO_CHECK-proj'
7219988b00 VS: Exclude ZERO_CHECK.proj from .sln for include_external_msproject Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7478
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx8
-rw-r--r--Source/cmGlobalVisualStudio10Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx6
-rw-r--r--Source/cmGlobalVisualStudioGenerator.h3
5 files changed, 20 insertions, 1 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") {
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 2203f71..12fd7a8 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -120,6 +120,8 @@ public:
bool IsInSolution(const cmGeneratorTarget* gt) const override;
+ bool IsDepInSolution(const std::string& targetName) const override;
+
/** Return true if building for WindowsCE */
bool TargetsWindowsCE() const override { return this->SystemIsWindowsCE; }
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index ce943a2..758ce83 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -180,7 +180,7 @@ void cmGlobalVisualStudio71Generator::WriteExternalProject(
fout << "\tProjectSection(ProjectDependencies) = postProject\n";
for (BT<std::pair<std::string, bool>> const& it : depends) {
std::string const& dep = it.Value.first;
- if (!dep.empty()) {
+ if (this->IsDepInSolution(dep)) {
fout << "\t\t{" << this->GetGUID(dep) << "} = {" << this->GetGUID(dep)
<< "}\n";
}
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index cddaaa4..c6af20a 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -843,6 +843,12 @@ bool cmGlobalVisualStudioGenerator::IsInSolution(
return gt->IsInBuildSystem();
}
+bool cmGlobalVisualStudioGenerator::IsDepInSolution(
+ const std::string& targetName) const
+{
+ return !targetName.empty();
+}
+
bool cmGlobalVisualStudioGenerator::TargetCompare::operator()(
cmGeneratorTarget const* l, cmGeneratorTarget const* r) const
{
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index 4f5f100..f45b4d4 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -101,6 +101,9 @@ public:
// return true if target should be included in solution.
virtual bool IsInSolution(const cmGeneratorTarget* gt) const;
+ // return true if project dependency should be included in solution.
+ virtual bool IsDepInSolution(const std::string& targetName) const;
+
/** Get the top-level registry key for this VS version. */
std::string GetRegistryBase();