cmUVProcessChain: Add Finished() method
diff --git a/Source/cmUVProcessChain.cxx b/Source/cmUVProcessChain.cxx
index 257c054..c2bb11e 100644
--- a/Source/cmUVProcessChain.cxx
+++ b/Source/cmUVProcessChain.cxx
@@ -420,3 +420,8 @@
   }
   return nullptr;
 }
+
+bool cmUVProcessChain::Finished() const
+{
+  return this->Data->ProcessesCompleted >= this->Data->Processes.size();
+}
diff --git a/Source/cmUVProcessChain.h b/Source/cmUVProcessChain.h
index 3ade3fd..9e4558e 100644
--- a/Source/cmUVProcessChain.h
+++ b/Source/cmUVProcessChain.h
@@ -90,6 +90,7 @@
   bool Wait(int64_t milliseconds = -1);
   std::vector<const Status*> GetStatus() const;
   const Status* GetStatus(std::size_t index) const;
+  bool Finished() const;
 
 private:
   friend class cmUVProcessChainBuilder;
diff --git a/Tests/CMakeLib/testUVProcessChain.cxx b/Tests/CMakeLib/testUVProcessChain.cxx
index cbb4384..ce6cd6d 100644
--- a/Tests/CMakeLib/testUVProcessChain.cxx
+++ b/Tests/CMakeLib/testUVProcessChain.cxx
@@ -148,6 +148,10 @@
     printResults(status, status1);
     return false;
   }
+  if (chain->Finished()) {
+    std::cout << "Finished() returned true, should be false" << std::endl;
+    return false;
+  }
 
   if (chain->Wait(6000)) {
     std::cout << "Wait() returned true, should be false" << std::endl;
@@ -159,6 +163,10 @@
     printResults(status, status2);
     return false;
   }
+  if (chain->Finished()) {
+    std::cout << "Finished() returned true, should be false" << std::endl;
+    return false;
+  }
 
   if (!chain->Wait()) {
     std::cout << "Wait() returned false, should be true" << std::endl;
@@ -170,6 +178,10 @@
     printResults(status, status3);
     return false;
   }
+  if (!chain->Finished()) {
+    std::cout << "Finished() returned false, should be true" << std::endl;
+    return false;
+  }
 
   return true;
 }