mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
ENH: make CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS the default and remove the property. If any value is specified in an endif, endforeach, endwhile, etc then make sure it matches the start string. If no values are given then it is no longer an error.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user