瀏覽代碼

cmStateDirectory: Fix comment on relative path top directory selection

Fix the comment added by commit f6d4fa63f8 (cmStateDirectory: Comment
relative path top directory selection approach, 2021-05-13) to describe
the actual behavior.
Brad King 4 年之前
父節點
當前提交
b4f07bfe5a
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      Source/cmStateDirectory.cxx

+ 2 - 4
Source/cmStateDirectory.cxx

@@ -45,8 +45,7 @@ void cmStateDirectory::ComputeRelativePathTopSource()
   std::string result = snapshots.front().GetDirectory().GetCurrentSource();
   std::string result = snapshots.front().GetDirectory().GetCurrentSource();
 
 
   // Walk up the buildsystem directory tree to find the highest source
   // Walk up the buildsystem directory tree to find the highest source
-  // directory that contains the current source directory and the
-  // intermediate ancestors.
+  // directory that contains the current source directory.
   for (cmStateSnapshot const& snp : cmMakeRange(snapshots).advance(1)) {
   for (cmStateSnapshot const& snp : cmMakeRange(snapshots).advance(1)) {
     std::string currentSource = snp.GetDirectory().GetCurrentSource();
     std::string currentSource = snp.GetDirectory().GetCurrentSource();
     if (cmSystemTools::IsSubDirectory(result, currentSource)) {
     if (cmSystemTools::IsSubDirectory(result, currentSource)) {
@@ -73,8 +72,7 @@ void cmStateDirectory::ComputeRelativePathTopBinary()
   std::string result = snapshots.front().GetDirectory().GetCurrentBinary();
   std::string result = snapshots.front().GetDirectory().GetCurrentBinary();
 
 
   // Walk up the buildsystem directory tree to find the highest binary
   // Walk up the buildsystem directory tree to find the highest binary
-  // directory that contains the current binary directory and the
-  // intermediate ancestors.
+  // directory that contains the current binary directory.
   for (cmStateSnapshot const& snp : cmMakeRange(snapshots).advance(1)) {
   for (cmStateSnapshot const& snp : cmMakeRange(snapshots).advance(1)) {
     std::string currentBinary = snp.GetDirectory().GetCurrentBinary();
     std::string currentBinary = snp.GetDirectory().GetCurrentBinary();
     if (cmSystemTools::IsSubDirectory(result, currentBinary)) {
     if (cmSystemTools::IsSubDirectory(result, currentBinary)) {