| 162 | cmQtAutoGenGlobalInitializer::~cmQtAutoGenGlobalInitializer() = default; |
| 163 | |
| 164 | void cmQtAutoGenGlobalInitializer::GetOrCreateGlobalTarget( |
| 165 | cmLocalGenerator* localGen, std::string const& name, |
| 166 | std::string const& comment) |
| 167 | { |
| 168 | // Test if the target already exists |
| 169 | if (!localGen->FindGeneratorTargetToUse(name)) { |
| 170 | cmMakefile const* makefile = localGen->GetMakefile(); |
| 171 | |
| 172 | // Create utility target |
| 173 | auto cc = cm::make_unique<cmCustomCommand>(); |
| 174 | cc->SetWorkingDirectory(makefile->GetHomeOutputDirectory().c_str()); |
| 175 | cc->SetEscapeOldStyle(false); |
| 176 | cc->SetComment(comment.c_str()); |
| 177 | cmTarget* target = localGen->AddUtilityCommand(name, true, std::move(cc)); |
| 178 | localGen->AddGeneratorTarget( |
| 179 | cm::make_unique<cmGeneratorTarget>(target, localGen)); |
| 180 | |
| 181 | // Set FOLDER property in the target |
| 182 | { |
| 183 | cmValue folder = |
| 184 | makefile->GetState()->GetGlobalProperty("AUTOGEN_TARGETS_FOLDER"); |
| 185 | if (folder) { |
| 186 | target->SetProperty("FOLDER", folder); |
| 187 | } |
| 188 | } |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | void cmQtAutoGenGlobalInitializer::AddToGlobalAutoGen( |
| 193 | cmLocalGenerator* localGen, std::string const& targetName) |
no test coverage detected