diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-02-29 12:18:11 -0500 |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-02-29 12:18:11 -0500 |
commit | f386c2aae09ff4af04a15ceebe41588fcbbae648 (patch) | |
tree | f6a6c2db3616485f7779941ae3b1ba4e00197ed8 /Source/cmWhileCommand.cxx | |
parent | 03ef00bc93511b6909f022a143c93bbb29bc2c58 (diff) | |
download | cmake-f386c2aae09ff4af04a15ceebe41588fcbbae648.tar.gz |
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.
Diffstat (limited to 'Source/cmWhileCommand.cxx')
-rw-r--r-- | Source/cmWhileCommand.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index 96842218bb..2836c1431f 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -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; } |