mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -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:
@@ -93,9 +93,10 @@ ShouldRemove(const cmListFileFunction& lff, cmMakefile& mf)
|
||||
{
|
||||
if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endwhile"))
|
||||
{
|
||||
if (lff.Arguments == this->Args
|
||||
|| cmSystemTools::IsOn
|
||||
(mf.GetPropertyOrDefinition("CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS")))
|
||||
// if the endwhile has arguments, then make sure
|
||||
// they match the arguments of the matching while
|
||||
if (lff.Arguments.size() == 0 ||
|
||||
lff.Arguments == this->Args)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user