diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2018-09-04 15:08:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-09-05 19:15:55 (GMT) |
commit | 4d89830d7117a6fb68346d4ebe5f2f3c6d3223a0 (patch) | |
tree | d7609df1293e9d4af24cb27e5d9f024844ed6144 /Source/cmUtilitySourceCommand.cxx | |
parent | 612975c6652c83c29fcfcf56a7b5a0cfe0218c93 (diff) | |
download | CMake-4d89830d7117a6fb68346d4ebe5f2f3c6d3223a0.zip CMake-4d89830d7117a6fb68346d4ebe5f2f3c6d3223a0.tar.gz CMake-4d89830d7117a6fb68346d4ebe5f2f3c6d3223a0.tar.bz2 |
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`.
Diffstat (limited to 'Source/cmUtilitySourceCommand.cxx')
-rw-r--r-- | Source/cmUtilitySourceCommand.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index a601637..f374626 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -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)); } |