MCPcopy Create free account
hub / github.com/Kitware/CMake / BuildRepogenCommand

Method BuildRepogenCommand

Source/CPack/IFW/cmCPackIFWGenerator.cxx:55–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55std::vector<std::string> cmCPackIFWGenerator::BuildRepogenCommand()
56{
57 std::vector<std::string> ifwCmd;
58
59 ifwCmd.emplace_back(this->RepoGen);
60
61 if (!this->IsVersionLess("4.2")) {
62 if (!this->ArchiveFormat.empty()) {
63 ifwCmd.emplace_back("--archive-format");
64 ifwCmd.emplace_back(this->ArchiveFormat);
65 }
66 if (!this->ArchiveCompression.empty()) {
67 ifwCmd.emplace_back("--compression");
68 ifwCmd.emplace_back(this->ArchiveCompression);
69 }
70 }
71
72 if (this->IsVersionLess("2.0.0")) {
73 ifwCmd.emplace_back("-c");
74 ifwCmd.emplace_back(this->toplevel + "/config/config.xml");
75 }
76
77 ifwCmd.emplace_back("-p");
78 ifwCmd.emplace_back(this->toplevel + "/packages");
79
80 if (!this->PkgsDirsVector.empty()) {
81 for (std::string const& it : this->PkgsDirsVector) {
82 ifwCmd.emplace_back("-p");
83 ifwCmd.emplace_back(it);
84 }
85 }
86
87 if (!this->RepoDirsVector.empty()) {
88 if (!this->IsVersionLess("3.1")) {
89 for (std::string const& rd : this->RepoDirsVector) {
90 ifwCmd.emplace_back("--repository");
91 ifwCmd.emplace_back(rd);
92 }
93 } else {
94 cmCPackIFWLogger(WARNING,
95 "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
96 << "variable is set, but content will be skipped, "
97 << "because this feature available only since "
98 << "QtIFW 3.1. Please update your QtIFW instance."
99 << std::endl);
100 }
101 }
102
103 if (!this->OnlineOnly && !this->DownloadedPackages.empty()) {
104 ifwCmd.emplace_back("-i");
105 auto it = this->DownloadedPackages.begin();
106 std::string ifwArg = (*it)->Name;
107 ++it;
108 while (it != this->DownloadedPackages.end()) {
109 ifwArg += "," + (*it)->Name;
110 ++it;
111 }
112 ifwCmd.emplace_back(ifwArg);

Callers 1

RunRepogenMethod · 0.95

Calls 5

emplace_backMethod · 0.80
IsVersionLessMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected