summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestMultiProcessHandler.cxx
diff options
context:
space:
mode:
authorChris Mahoney <chris.mahoney@kitware.com>2023-08-09 18:28:09 (GMT)
committerBrad King <brad.king@kitware.com>2023-11-17 23:41:41 (GMT)
commit8c307ab5670877454572f9e0b3cdc4ae58cefd7b (patch)
tree2d3965f91363d4b8b072fa6db919ca885bbc5864 /Source/CTest/cmCTestMultiProcessHandler.cxx
parent1f8f270f625d32486d1af7e7eac691bcafb5c2e4 (diff)
downloadCMake-8c307ab5670877454572f9e0b3cdc4ae58cefd7b.zip
CMake-8c307ab5670877454572f9e0b3cdc4ae58cefd7b.tar.gz
CMake-8c307ab5670877454572f9e0b3cdc4ae58cefd7b.tar.bz2
cmCTestMultiProcessHandler: Replace false condition with opposite assert
Diffstat (limited to 'Source/CTest/cmCTestMultiProcessHandler.cxx')
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 24e8569..b82e968 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -156,9 +156,7 @@ bool cmCTestMultiProcessHandler::StartTestProcess(int test)
{
if (this->HaveAffinity && this->Properties[test]->WantAffinity) {
size_t needProcessors = this->GetProcessorsUsed(test);
- if (needProcessors > this->ProcessorsAvailable.size()) {
- return false;
- }
+ assert(needProcessors <= this->ProcessorsAvailable.size());
std::vector<size_t> affinity;
affinity.reserve(needProcessors);
for (size_t i = 0; i < needProcessors; ++i) {