| 4477 | } |
| 4478 | |
| 4479 | std::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 | |
| 4506 | bool cmGeneratorTarget::UsesDefaultOutputDir( |
| 4507 | std::string const& config, cmStateEnums::ArtifactType artifact) const |
no test coverage detected