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

Method GetExecutableNames

Source/cmGeneratorTarget.cxx:3723–3788  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3721}
3722
3723cmGeneratorTarget::Names cmGeneratorTarget::GetExecutableNames(
3724 std::string const& config) const
3725{
3726 cmGeneratorTarget::Names targetNames;
3727
3728 // This should not be called for imported targets.
3729 // TODO: Split cmTarget into a class hierarchy to get compile-time
3730 // enforcement of the limited imported target API.
3731 if (this->IsImported()) {
3732 std::string msg = cmStrCat(
3733 "GetExecutableNames called on imported target: ", this->GetName());
3734 this->LocalGenerator->IssueMessage(MessageType::INTERNAL_ERROR, msg);
3735 }
3736
3737// This versioning is supported only for executables and then only
3738// when the platform supports symbolic links.
3739#if defined(_WIN32) && !defined(__CYGWIN__)
3740 cmValue version;
3741#else
3742 // Check for executable version properties.
3743 cmValue version = this->GetProperty("VERSION");
3744 if (this->GetType() != cmStateEnums::EXECUTABLE ||
3745 this->Makefile->IsOn("XCODE")) {
3746 version = nullptr;
3747 }
3748#endif
3749
3750 // Get the components of the executable name.
3751 NameComponents const& components = this->GetFullNameInternalComponents(
3752 config, cmStateEnums::RuntimeBinaryArtifact);
3753
3754 // The executable name.
3755 targetNames.Base = components.base;
3756
3757 if (this->IsArchivedAIXSharedLibrary()) {
3758 targetNames.Output = components.prefix + targetNames.Base;
3759 } else {
3760 targetNames.Output =
3761 components.prefix + targetNames.Base + components.suffix;
3762 }
3763
3764// The executable's real name on disk.
3765#if defined(__CYGWIN__)
3766 targetNames.Real = components.prefix + targetNames.Base;
3767#else
3768 targetNames.Real = targetNames.Output;
3769#endif
3770 if (version) {
3771 targetNames.Real += "-";
3772 targetNames.Real += *version;
3773 }
3774#if defined(__CYGWIN__)
3775 targetNames.Real += components.suffix;
3776#endif
3777
3778 // The import library name.
3779 targetNames.ImportLibrary =
3780 this->GetFullNameInternal(config, cmStateEnums::ImportLibraryArtifact);

Callers 11

ComputeTargetManifestMethod · 0.95
NormalGetRealNameMethod · 0.95
WriteExecutableRuleMethod · 0.80
GenerateMethod · 0.80
DetectOutputMethod · 0.80
GetFilesMethod · 0.80
GetInstallFilenameMethod · 0.80
OutputBuildToolMethod · 0.80
TargetNamesMethod · 0.80
ComputeLinkOptionsMethod · 0.80

Calls 10

IsImportedMethod · 0.95
GetPropertyMethod · 0.95
GetTypeMethod · 0.95
GetFullNameInternalMethod · 0.95
GetPDBNameMethod · 0.95
cmStrCatFunction · 0.70
GetNameMethod · 0.45
IssueMessageMethod · 0.45
IsOnMethod · 0.45

Tested by

no test coverage detected