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

Method ComputeTargetManifest

Source/cmGeneratorTarget.cxx:3371–3426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3369}
3370
3371void cmGeneratorTarget::ComputeTargetManifest(std::string const& config) const
3372{
3373 if (this->IsImported()) {
3374 return;
3375 }
3376 cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator();
3377
3378 // Get the names.
3379 cmGeneratorTarget::Names targetNames;
3380 if (this->GetType() == cmStateEnums::EXECUTABLE) {
3381 targetNames = this->GetExecutableNames(config);
3382 } else if (this->GetType() == cmStateEnums::STATIC_LIBRARY ||
3383 this->GetType() == cmStateEnums::SHARED_LIBRARY ||
3384 this->GetType() == cmStateEnums::MODULE_LIBRARY) {
3385 targetNames = this->GetLibraryNames(config);
3386 } else {
3387 return;
3388 }
3389
3390 // Get the directory.
3391 std::string dir =
3392 this->GetDirectory(config, cmStateEnums::RuntimeBinaryArtifact);
3393
3394 // Add each name.
3395 std::string f;
3396 if (!targetNames.Output.empty()) {
3397 f = cmStrCat(dir, '/', targetNames.Output);
3398 gg->AddToManifest(f);
3399 }
3400 if (!targetNames.SharedObject.empty()) {
3401 f = cmStrCat(dir, '/', targetNames.SharedObject);
3402 gg->AddToManifest(f);
3403 }
3404 if (!targetNames.Real.empty()) {
3405 f = cmStrCat(dir, '/', targetNames.Real);
3406 gg->AddToManifest(f);
3407 }
3408 if (!targetNames.PDB.empty()) {
3409 f = cmStrCat(dir, '/', targetNames.PDB);
3410 gg->AddToManifest(f);
3411 }
3412
3413 dir = this->GetDirectory(config, cmStateEnums::ImportLibraryArtifact);
3414 if (!targetNames.ImportOutput.empty()) {
3415 f = cmStrCat(dir, '/', targetNames.ImportOutput);
3416 gg->AddToManifest(f);
3417 }
3418 if (!targetNames.ImportLibrary.empty()) {
3419 f = cmStrCat(dir, '/', targetNames.ImportLibrary);
3420 gg->AddToManifest(f);
3421 }
3422 if (!targetNames.ImportReal.empty()) {
3423 f = cmStrCat(dir, '/', targetNames.ImportReal);
3424 gg->AddToManifest(f);
3425 }
3426}
3427
3428cm::optional<cmStandardLevel> cmGeneratorTarget::GetExplicitStandardLevel(

Callers

nothing calls this directly

Calls 9

IsImportedMethod · 0.95
GetTypeMethod · 0.95
GetExecutableNamesMethod · 0.95
GetLibraryNamesMethod · 0.95
GetDirectoryMethod · 0.95
AddToManifestMethod · 0.80
cmStrCatFunction · 0.70
GetGlobalGeneratorMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected