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

Method GetDirectory

Source/cmGeneratorTarget.cxx:4479–4504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4477}
4478
4479std::string cmGeneratorTarget::GetDirectory(
4480 std::string const& config, cmStateEnums::ArtifactType artifact) const
4481{
4482 if (this->IsImported()) {
4483 auto fullPath = this->Target->ImportedGetFullPath(config, artifact);
4484 if (this->IsFrameworkOnApple()) {
4485 auto fwDescriptor = this->GetGlobalGenerator()->SplitFrameworkPath(
4486 fullPath, cmGlobalGenerator::FrameworkFormat::Strict);
4487 if (fwDescriptor) {
4488 return fwDescriptor->Directory;
4489 }
4490 }
4491 // Return the directory from which the target is imported.
4492 return cmSystemTools::GetFilenamePath(fullPath);
4493 }
4494 if (OutputInfo const* info = this->GetOutputInfo(config)) {
4495 // Return the directory in which the target will be built.
4496 switch (artifact) {
4497 case cmStateEnums::RuntimeBinaryArtifact:
4498 return info->OutDir;
4499 case cmStateEnums::ImportLibraryArtifact:
4500 return info->ImpDir;
4501 }
4502 }
4503 return "";
4504}
4505
4506bool cmGeneratorTarget::UsesDefaultOutputDir(
4507 std::string const& config, cmStateEnums::ArtifactType artifact) const

Callers 5

ComputeTargetManifestMethod · 0.95
NormalGetFullPathMethod · 0.95

Calls 6

IsImportedMethod · 0.95
IsFrameworkOnAppleMethod · 0.95
GetGlobalGeneratorMethod · 0.95
GetOutputInfoMethod · 0.95
ImportedGetFullPathMethod · 0.80
SplitFrameworkPathMethod · 0.80

Tested by

no test coverage detected