diff options
Diffstat (limited to 'Source/cmTryRunCommand.cxx')
-rw-r--r-- | Source/cmTryRunCommand.cxx | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index 8b68d64..c9e7a46 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -10,7 +10,6 @@ See the License for more information. ============================================================================*/ #include "cmTryRunCommand.h" -#include "cmCacheManager.h" #include "cmTryCompileCommand.h" #include <cmsys/FStream.hxx> @@ -239,7 +238,7 @@ void cmTryRunCommand::RunExecutable(const std::string& runArgs, } this->Makefile->AddCacheDefinition(this->RunResultVariable, retChar, "Result of TRY_RUN", - cmCacheManager::INTERNAL); + cmState::INTERNAL); } /* This is only used when cross compiling. Instead of running the @@ -284,13 +283,14 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs, this->Makefile->AddCacheDefinition(this->RunResultVariable, "PLEASE_FILL_OUT-FAILED_TO_RUN", comment.c_str(), - cmCacheManager::STRING); + cmState::STRING); - cmCacheManager::CacheIterator it = this->Makefile->GetCacheManager()-> - GetCacheIterator(this->RunResultVariable.c_str()); - if ( !it.IsAtEnd() ) + cmState* state = this->Makefile->GetState(); + const char* existingValue + = state->GetCacheEntryValue(this->RunResultVariable); + if (existingValue) { - it.SetProperty("ADVANCED", "1"); + state->SetCacheEntryProperty(this->RunResultVariable, "ADVANCED", "1"); } error = true; @@ -311,12 +311,14 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs, this->Makefile->AddCacheDefinition(internalRunOutputName, "PLEASE_FILL_OUT-NOTFOUND", comment.c_str(), - cmCacheManager::STRING); - cmCacheManager::CacheIterator it = this->Makefile->GetCacheManager()-> - GetCacheIterator(internalRunOutputName.c_str()); - if ( !it.IsAtEnd() ) + cmState::STRING); + cmState* state = this->Makefile->GetState(); + const char* existing = + state->GetCacheEntryValue(internalRunOutputName); + if (existing) { - it.SetProperty("ADVANCED", "1"); + state->SetCacheEntryProperty(internalRunOutputName, + "ADVANCED", "1"); } error = true; |