diff options
author | Nils Gladitz <nilsgladitz@gmail.com> | 2014-09-11 19:50:51 +0200 |
---|---|---|
committer | Nils Gladitz <nilsgladitz@gmail.com> | 2014-09-11 21:17:09 +0200 |
commit | b900c1ccaae7a500dda88240873122d0d899bf93 (patch) | |
tree | 524168715d82090de6c13a0c887ebbab2ad0322d /Source/cmWhileCommand.cxx | |
parent | 103ddca336c6ccf2fca3c2b8897c8f9319f836d5 (diff) | |
download | cmake-b900c1ccaae7a500dda88240873122d0d899bf93.tar.gz |
If: Extract cmConditionEvaluator from if() implementation
Diffstat (limited to 'Source/cmWhileCommand.cxx')
-rw-r--r-- | Source/cmWhileCommand.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index 7d2eeadd66..5565b8a058 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -10,7 +10,7 @@ See the License for more information. ============================================================================*/ #include "cmWhileCommand.h" -#include "cmIfCommand.h" +#include "cmConditionEvaluator.h" bool cmWhileFunctionBlocker:: IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, @@ -37,9 +37,11 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, std::vector<std::string> expandedArguments; mf.ExpandArguments(this->Args, expandedArguments); cmake::MessageType messageType; - bool isTrue = - cmIfCommand::IsTrue(expandedArguments,errorString, - &mf, messageType); + + cmConditionEvaluator conditionEvaluator(mf); + + bool isTrue = conditionEvaluator.IsTrue( + expandedArguments, errorString, messageType); while (isTrue) { @@ -86,9 +88,8 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, } expandedArguments.clear(); mf.ExpandArguments(this->Args, expandedArguments); - isTrue = - cmIfCommand::IsTrue(expandedArguments,errorString, - &mf, messageType); + isTrue = conditionEvaluator.IsTrue( + expandedArguments, errorString, messageType); } return true; } |