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/cmForEachCommand.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/cmForEachCommand.cxx')
-rw-r--r-- | Source/cmForEachCommand.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index 848c6a4fe7..b13a849f3b 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; } |