diff options
Diffstat (limited to 'Source/cmUtilitySourceCommand.cxx')
-rw-r--r-- | Source/cmUtilitySourceCommand.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index 6de78ff..d276c8a 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -6,6 +6,7 @@ #include "cmExecutionStatus.h" #include "cmMakefile.h" +#include "cmProperty.h" #include "cmState.h" #include "cmStateTypes.h" #include "cmStringAlgorithms.h" @@ -24,7 +25,7 @@ bool cmUtilitySourceCommand(std::vector<std::string> const& args, // The first argument is the cache entry name. std::string const& cacheEntry = *arg++; - const char* cacheValue = status.GetMakefile().GetDefinition(cacheEntry); + cmProp cacheValue = status.GetMakefile().GetDefinition(cacheEntry); // If it exists already and appears up to date then we are done. If // the string contains "(IntDir)" but that is not the // CMAKE_CFG_INTDIR setting then the value is out of date. @@ -45,7 +46,7 @@ bool cmUtilitySourceCommand(std::vector<std::string> const& args, } else { cmState* state = status.GetMakefile().GetState(); haveCacheValue = (cacheValue && - (strstr(cacheValue, "(IntDir)") == nullptr || + (strstr(cacheValue->c_str(), "(IntDir)") == nullptr || (intDir == "$(IntDir)")) && (state->GetCacheMajorVersion() != 0 && state->GetCacheMinorVersion() != 0)); @@ -84,8 +85,9 @@ bool cmUtilitySourceCommand(std::vector<std::string> const& args, std::string utilityDirectory = status.GetMakefile().GetCurrentBinaryDirectory(); std::string exePath; - if (auto d = status.GetMakefile().GetDefinition("EXECUTABLE_OUTPUT_PATH")) { - exePath = d; + if (cmProp d = + status.GetMakefile().GetDefinition("EXECUTABLE_OUTPUT_PATH")) { + exePath = *d; } if (!exePath.empty()) { utilityDirectory = exePath; @@ -96,7 +98,7 @@ bool cmUtilitySourceCommand(std::vector<std::string> const& args, // Construct the cache entry for the executable's location. std::string utilityExecutable = utilityDirectory + "/" + cmakeCFGout + "/" + utilityName + - status.GetMakefile().GetDefinition("CMAKE_EXECUTABLE_SUFFIX"); + *status.GetMakefile().GetDefinition("CMAKE_EXECUTABLE_SUFFIX"); // make sure we remove any /./ in the name cmSystemTools::ReplaceString(utilityExecutable, "/./", "/"); |