diff options
author | Dāvis Mosāns <davispuh@gmail.com> | 2016-07-07 21:54:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-07-18 13:51:01 (GMT) |
commit | b1f87a50b3aee129d420b8d789ebec55068e4ec5 (patch) | |
tree | e9223617c45d01c60a4c89c5d60dc0121a75a989 /Source/cmMakefile.cxx | |
parent | 03407040d4d7d89fbb45e941a9dfb4257003a8a8 (diff) | |
download | CMake-b1f87a50b3aee129d420b8d789ebec55068e4ec5.zip CMake-b1f87a50b3aee129d420b8d789ebec55068e4ec5.tar.gz CMake-b1f87a50b3aee129d420b8d789ebec55068e4ec5.tar.bz2 |
Use better KWSys SystemTools::GetEnv and HasEnv signatures
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 0d550dd..ab7de57 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2572,6 +2572,7 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew( std::string const& lookup = result.substr(var.loc); const char* value = CM_NULLPTR; std::string varresult; + std::string svalue; static const std::string lineVar = "CMAKE_CURRENT_LIST_LINE"; switch (var.domain) { case NORMAL: @@ -2584,7 +2585,9 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew( } break; case ENVIRONMENT: - value = cmSystemTools::GetEnv(lookup.c_str()); + if (cmSystemTools::GetEnv(lookup, svalue)) { + value = svalue.c_str(); + } break; case CACHE: value = state->GetCacheEntryValue(lookup); |