diff options
Diffstat (limited to 'Source/cmForEachCommand.cxx')
-rw-r--r-- | Source/cmForEachCommand.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index 848c6a4..b13a849 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -103,10 +103,10 @@ ShouldRemove(const cmListFileFunction& lff, cmMakefile& mf) { std::vector<std::string> expandedArguments; mf.ExpandArguments(lff.Arguments, expandedArguments); - if ((!expandedArguments.empty() && - (expandedArguments[0] == this->Args[0])) - || cmSystemTools::IsOn - (mf.GetPropertyOrDefinition("CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS"))) + // if the endforeach has arguments then make sure + // they match the begin foreach arguments + if ((expandedArguments.empty() || + (expandedArguments[0] == this->Args[0]))) { return true; } |