diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-08-01 19:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-09-02 11:27:32 (GMT) |
commit | 11425041f04fd0945480b8f9e9933d1549b93981 (patch) | |
tree | 9cafffd6774513f686440b31795cbb3b5e38b65c /Source/cmFileCommand.cxx | |
parent | 99b21e58e020fedc6d09a619c1a8dc2e9ea7e2c5 (diff) | |
download | CMake-11425041f04fd0945480b8f9e9933d1549b93981.zip CMake-11425041f04fd0945480b8f9e9933d1549b93981.tar.gz CMake-11425041f04fd0945480b8f9e9933d1549b93981.tar.bz2 |
cmMakefile::GetDefinition: return cmProp
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index f1169cc..cdb1492 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -44,6 +44,7 @@ #include "cmMessageType.h" #include "cmNewLineStyle.h" #include "cmPolicies.h" +#include "cmProperty.h" #include "cmRange.h" #include "cmRuntimeDependencyArchive.h" #include "cmState.h" @@ -1568,7 +1569,7 @@ bool HandleDownloadCommand(std::vector<std::string> const& args, std::string logVar; std::string statusVar; bool tls_verify = status.GetMakefile().IsOn("CMAKE_TLS_VERIFY"); - const char* cainfo = status.GetMakefile().GetDefinition("CMAKE_TLS_CAINFO"); + cmProp cainfo = status.GetMakefile().GetDefinition("CMAKE_TLS_CAINFO"); std::string netrc_level = status.GetMakefile().GetSafeDefinition("CMAKE_NETRC"); std::string netrc_file = @@ -1623,7 +1624,7 @@ bool HandleDownloadCommand(std::vector<std::string> const& args, } else if (*i == "TLS_CAINFO") { ++i; if (i != args.end()) { - cainfo = i->c_str(); + cainfo = &(*i); } else { status.SetError("DOWNLOAD missing file value for TLS_CAINFO."); return false; @@ -1790,7 +1791,7 @@ bool HandleDownloadCommand(std::vector<std::string> const& args, // check to see if a CAINFO file has been specified // command arg comes first - std::string const& cainfo_err = cmCurlSetCAInfo(curl, cainfo); + std::string const& cainfo_err = cmCurlSetCAInfo(curl, cmToCStr(cainfo)); if (!cainfo_err.empty()) { status.SetError(cainfo_err); return false; @@ -1956,7 +1957,7 @@ bool HandleUploadCommand(std::vector<std::string> const& args, std::string statusVar; bool showProgress = false; bool tls_verify = status.GetMakefile().IsOn("CMAKE_TLS_VERIFY"); - const char* cainfo = status.GetMakefile().GetDefinition("CMAKE_TLS_CAINFO"); + cmProp cainfo = status.GetMakefile().GetDefinition("CMAKE_TLS_CAINFO"); std::string userpwd; std::string netrc_level = status.GetMakefile().GetSafeDefinition("CMAKE_NETRC"); @@ -2009,7 +2010,7 @@ bool HandleUploadCommand(std::vector<std::string> const& args, } else if (*i == "TLS_CAINFO") { ++i; if (i != args.end()) { - cainfo = i->c_str(); + cainfo = &(*i); } else { status.SetError("UPLOAD missing file value for TLS_CAINFO."); return false; @@ -2110,7 +2111,7 @@ bool HandleUploadCommand(std::vector<std::string> const& args, // check to see if a CAINFO file has been specified // command arg comes first - std::string const& cainfo_err = cmCurlSetCAInfo(curl, cainfo); + std::string const& cainfo_err = cmCurlSetCAInfo(curl, cmToCStr(cainfo)); if (!cainfo_err.empty()) { status.SetError(cainfo_err); return false; |