diff options
author | Brad King <brad.king@kitware.com> | 2020-05-14 09:18:01 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-05-15 05:39:25 -0400 |
commit | 25995b2b3028a5f990792b6e2e409f681c3a89d0 (patch) | |
tree | e52d07357e8b7a57cf2d53d78491a98a0a7ee8f8 /Source/cmGlobalGenerator.cxx | |
parent | ae9614a22d5e39882b2a686e8229170a8296212d (diff) | |
download | cmake-25995b2b3028a5f990792b6e2e409f681c3a89d0.tar.gz |
cmGlobalGenerator: Fix CheckTargetsForMissingSources after refactoring
Refactoring in commit 01b2d6ab74 (Modernize: Use ranged for-loops when
possible, 2019-02-07, v3.15.0-rc1~575^2) accidentally changed a loop
condition in this method from "keep iterating if srcs.empty()" to
"stop iterating if srcs.empty()". Switch it back.
The bug could only manifest in very subtle conditions in a multi-config
generator. Add one such case to the test suite.
Fixes: #20706
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 6370ed2b23..cfad4c215d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -320,7 +320,7 @@ bool cmGlobalGenerator::CheckTargetsForMissingSources() const } else { for (std::string const& config : configs) { target->GetSourceFiles(srcs, config); - if (srcs.empty()) { + if (!srcs.empty()) { break; } } |