diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-02-29 17:18:11 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-02-29 17:18:11 (GMT) |
commit | f386c2aae09ff4af04a15ceebe41588fcbbae648 (patch) | |
tree | f6a6c2db3616485f7779941ae3b1ba4e00197ed8 /Source/cmIfCommand.cxx | |
parent | 03ef00bc93511b6909f022a143c93bbb29bc2c58 (diff) | |
download | CMake-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/cmIfCommand.cxx')
-rw-r--r-- | Source/cmIfCommand.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index bc82c42..f38d265 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -145,9 +145,10 @@ bool cmIfFunctionBlocker::ShouldRemove(const cmListFileFunction& lff, { if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endif")) { - if (cmSystemTools::IsOn - (mf.GetPropertyOrDefinition("CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS")) - || lff.Arguments == this->Args) + // if the endif has arguments, then make sure + // they match the arguments of the matching if + if (lff.Arguments.size() == 0 || + lff.Arguments == this->Args) { return true; } |