summaryrefslogtreecommitdiffstats
path: root/Source/cmWhileCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-02-29 17:18:11 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-02-29 17:18:11 (GMT)
commitf386c2aae09ff4af04a15ceebe41588fcbbae648 (patch)
treef6a6c2db3616485f7779941ae3b1ba4e00197ed8 /Source/cmWhileCommand.cxx
parent03ef00bc93511b6909f022a143c93bbb29bc2c58 (diff)
downloadCMake-f386c2aae09ff4af04a15ceebe41588fcbbae648.zip
CMake-f386c2aae09ff4af04a15ceebe41588fcbbae648.tar.gz
CMake-f386c2aae09ff4af04a15ceebe41588fcbbae648.tar.bz2
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.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx
index 9684221..2836c14 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;
}