mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
cmMakefile: Make GetRequiredDefinition return std::string
In all cases the return value is converted to std::string anyway. Also remove unnecessary `c_str()` calls in arguments to `GetRequiredDefinition`.
This commit is contained in:
committed by
Brad King
parent
612975c665
commit
4d89830d71
@@ -28,7 +28,7 @@ bool cmUtilitySourceCommand::InitialPass(std::vector<std::string> const& args,
|
||||
// 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.
|
||||
const char* intDir =
|
||||
std::string const& intDir =
|
||||
this->Makefile->GetRequiredDefinition("CMAKE_CFG_INTDIR");
|
||||
|
||||
bool haveCacheValue = false;
|
||||
@@ -46,7 +46,7 @@ bool cmUtilitySourceCommand::InitialPass(std::vector<std::string> const& args,
|
||||
cmState* state = this->Makefile->GetState();
|
||||
haveCacheValue = (cacheValue &&
|
||||
(strstr(cacheValue, "(IntDir)") == nullptr ||
|
||||
(intDir && strcmp(intDir, "$(IntDir)") == 0)) &&
|
||||
(intDir == "$(IntDir)")) &&
|
||||
(state->GetCacheMajorVersion() != 0 &&
|
||||
state->GetCacheMinorVersion() != 0));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user