diff options
author | Nils Gladitz <nilsgladitz@gmail.com> | 2014-09-11 17:50:51 (GMT) |
---|---|---|
committer | Nils Gladitz <nilsgladitz@gmail.com> | 2014-09-11 19:17:09 (GMT) |
commit | b900c1ccaae7a500dda88240873122d0d899bf93 (patch) | |
tree | 524168715d82090de6c13a0c887ebbab2ad0322d /Source/cmWhileCommand.cxx | |
parent | 103ddca336c6ccf2fca3c2b8897c8f9319f836d5 (diff) | |
download | CMake-b900c1ccaae7a500dda88240873122d0d899bf93.zip CMake-b900c1ccaae7a500dda88240873122d0d899bf93.tar.gz CMake-b900c1ccaae7a500dda88240873122d0d899bf93.tar.bz2 |
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 7d2eead..5565b8a 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; } |