summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-08-07 15:33:48 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-08-07 15:34:05 (GMT)
commitcb75716e4e965ab3b383156b9ec2eef5e374e365 (patch)
treeefaecb16defc04b680b18c9275bbb22f343f7408 /Source
parent87599d0bad2008be2e4e953a2de0769b2ccee927 (diff)
parent1972a7b6e36723c67bfeaa996ce075de25b23169 (diff)
downloadCMake-cb75716e4e965ab3b383156b9ec2eef5e374e365.zip
CMake-cb75716e4e965ab3b383156b9ec2eef5e374e365.tar.gz
CMake-cb75716e4e965ab3b383156b9ec2eef5e374e365.tar.bz2
Merge topic 'revert-vs-show-cmake-files'
1972a7b6e3 Merge branch 'backport-revert-vs-show-cmake-files' 0d1529000d VS: Revert "Add CMake input files to ZERO_CHECK" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8681
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx16
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx56
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h4
3 files changed, 1 insertions, 75 deletions
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 2e87502..0d357ad 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -265,22 +265,6 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
auto new_end = std::unique(listFiles.begin(), listFiles.end());
listFiles.erase(new_end, listFiles.end());
- // Add all cmake input files which are used by the project
- // so Visual Studio does not close them when reloading it.
- for (const std::string& listFile : listFiles) {
- if (listFile.find("/CMakeFiles/") != std::string::npos) {
- continue;
- }
- if (!cmSystemTools::IsSubDirectory(listFile,
- lg.GetMakefile()->GetHomeDirectory()) &&
- !cmSystemTools::IsSubDirectory(
- listFile, lg.GetMakefile()->GetHomeOutputDirectory())) {
- continue;
- }
-
- tgt->AddSource(listFile);
- }
-
auto ptr = cm::make_unique<cmGeneratorTarget>(tgt, &lg);
auto* gt = ptr.get();
lg.AddGeneratorTarget(std::move(ptr));
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 1559420..700631c 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -9,7 +9,6 @@
#include <set>
#include <sstream>
-#include <cm/filesystem>
#include <cm/memory>
#include <cm/optional>
#include <cm/string_view>
@@ -54,8 +53,6 @@
#include "cmValue.h"
#include "cmVisualStudioGeneratorOptions.h"
-const std::string kBuildSystemSources = "Buildsystem Input Files";
-
struct cmIDEFlagTable;
static void ConvertToWindowsSlash(std::string& s);
@@ -1968,13 +1965,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
"http://schemas.microsoft.com/developer/msbuild/2003");
for (auto const& ti : this->Tools) {
- if ((this->GeneratorTarget->GetName() ==
- CMAKE_CHECK_BUILD_SYSTEM_TARGET) &&
- (ti.first == "None"_s)) {
- this->WriteBuildSystemSources(e0, ti.first, ti.second);
- } else {
- this->WriteGroupSources(e0, ti.first, ti.second, sourceGroups);
- }
+ this->WriteGroupSources(e0, ti.first, ti.second, sourceGroups);
}
// Added files are images and the manifest.
@@ -2045,18 +2036,6 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;"
"gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms");
}
-
- if (this->GeneratorTarget->GetName() ==
- CMAKE_CHECK_BUILD_SYSTEM_TARGET) {
- for (const std::string& filter : this->BuildSystemSourcesFilters) {
- std::string guidName = "SG_Filter_";
- guidName += filter;
- std::string guid = this->GlobalGenerator->GetGUID(guidName);
- Elem e2(e1, "Filter");
- e2.Attribute("Include", filter);
- e2.Element("UniqueIdentifier", cmStrCat('{', guid, '}'));
- }
- }
}
}
fout << '\n';
@@ -2123,39 +2102,6 @@ void cmVisualStudio10TargetGenerator::WriteGroupSources(
}
}
-void cmVisualStudio10TargetGenerator::WriteBuildSystemSources(
- Elem& e0, std::string const& name, ToolSources const& sources)
-{
- const std::string srcDir = this->Makefile->GetCurrentSourceDirectory();
- const std::string::size_type srcDirLength = srcDir.length();
-
- Elem e1(e0, "ItemGroup");
- e1.SetHasElements();
- for (ToolSource const& s : sources) {
- cmSourceFile const* sf = s.SourceFile;
- std::string const& source = sf->GetFullPath();
-
- cm::filesystem::path sourcePath(source);
- bool isInSrcDir = cmHasPrefix(source, srcDir);
-
- std::string filter = kBuildSystemSources;
- if (isInSrcDir) {
- std::string parentPath = sourcePath.parent_path().string();
- if (srcDir != parentPath) {
- filter += parentPath.substr(srcDirLength);
- }
- ConvertToWindowsSlash(filter);
- this->BuildSystemSourcesFilters.insert(filter);
- }
-
- std::string path = this->ConvertPath(source, s.RelativePath);
- ConvertToWindowsSlash(path);
- Elem e2(e1, name);
- e2.Attribute("Include", path);
- e2.Element("Filter", filter);
- }
-}
-
void cmVisualStudio10TargetGenerator::WriteHeaderSource(
Elem& e1, cmSourceFile const* sf, ConfigToSettings const& toolSettings)
{
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index ffab91f..2080e9e 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -194,9 +194,6 @@ private:
void WriteGroupSources(Elem& e0, std::string const& name,
ToolSources const& sources,
std::vector<cmSourceGroup>&);
- void WriteBuildSystemSources(Elem& e0, std::string const& name,
- ToolSources const& sources);
-
void AddMissingSourceGroups(std::set<cmSourceGroup const*>& groupsUsed,
const std::vector<cmSourceGroup>& allGroups);
bool IsResxHeader(const std::string& headerFile);
@@ -247,7 +244,6 @@ private:
std::set<std::string> ASanEnabledConfigurations;
std::set<std::string> FuzzerEnabledConfigurations;
std::map<std::string, std::string> SpectreMitigation;
- std::set<std::string> BuildSystemSourcesFilters;
cmGlobalVisualStudio10Generator* const GlobalGenerator;
cmLocalVisualStudio10Generator* const LocalGenerator;
std::set<std::string> CSharpCustomCommandNames;