summaryrefslogtreecommitdiffstats
path: root/Source/cmForEachCommand.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/cmForEachCommand.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/cmForEachCommand.cxx')
-rw-r--r--Source/cmForEachCommand.cxx8
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;
}