summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-14 13:25:12 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-14 13:43:30 (GMT)
commit77303314dcd58cc820c5e9ad9c30c0428d59b45a (patch)
tree14514771a07aebb7ffb80891e540cc61caf5e1b5 /Source/cmVisualStudio10TargetGenerator.cxx
parent848dc85187ec1e4b2364987d911ce7af93062b45 (diff)
downloadCMake-77303314dcd58cc820c5e9ad9c30c0428d59b45a.zip
CMake-77303314dcd58cc820c5e9ad9c30c0428d59b45a.tar.gz
CMake-77303314dcd58cc820c5e9ad9c30c0428d59b45a.tar.bz2
Restore support for a custom source group for CMakeLists.txt
Since commit v3.11.0-rc1~467^2 (VS,Xcode: Add CMakeLists.txt sources without mutating targets, 2017-10-18) we do not add `CMakeLists.txt` to target sources but instead generate references to them directly. This accidentally dropped generation of the `.vcxproj.filters` entry for a source group in which `CMakeLists.txt` is the only member. Fixes: #18795
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index b0e70ff..1b145d3 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1419,6 +1419,14 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
groupsUsed.insert(sourceGroup);
}
+ if (cmSourceFile const* srcCMakeLists =
+ this->LocalGenerator->CreateVCProjBuildRule()) {
+ std::string const& source = srcCMakeLists->GetFullPath();
+ cmSourceGroup* sourceGroup =
+ this->Makefile->FindSourceGroup(source, sourceGroups);
+ groupsUsed.insert(sourceGroup);
+ }
+
this->AddMissingSourceGroups(groupsUsed, sourceGroups);
// Write out group file