diff options
author | Regina Pfeifer <regina@mailbox.org> | 2018-11-28 21:11:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-16 15:34:08 (GMT) |
commit | 65f1fc9d6329feb2d48ee986d4243166a66049af (patch) | |
tree | 9b9f87a6c31164fe0c6e8282b110e95185dad217 /Source/cmCTest.cxx | |
parent | 2bedd5fb7c02987ad209f96889e2578a16806e01 (diff) | |
download | CMake-65f1fc9d6329feb2d48ee986d4243166a66049af.zip CMake-65f1fc9d6329feb2d48ee986d4243166a66049af.tar.gz CMake-65f1fc9d6329feb2d48ee986d4243166a66049af.tar.bz2 |
CTest: Add function GetSubmitURL
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 65c0d91..881da48 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2626,6 +2626,32 @@ void cmCTest::SetCTestConfiguration(const char* name, const char* value, this->CTestConfiguration[name] = value; } +std::string cmCTest::GetSubmitURL() +{ + std::string url; + { + std::string method = this->GetCTestConfiguration("DropMethod"); + std::string user = this->GetCTestConfiguration("DropSiteUser"); + std::string password = this->GetCTestConfiguration("DropSitePassword"); + std::string site = this->GetCTestConfiguration("DropSite"); + std::string location = this->GetCTestConfiguration("DropLocation"); + + url = method.empty() ? "http" : method; + url += "://"; + if (!user.empty()) { + url += user; + if (!password.empty()) { + url += ':'; + url += password; + } + url += '@'; + } + url += site; + url += location; + } + return url; +} + std::string cmCTest::GetCurrentTag() { return this->CurrentTag; |