summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx38
1 files changed, 26 insertions, 12 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b53adf8..1281bc6 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -811,12 +811,12 @@ std::pair<bool, cmValue> FileSetType::ReadProperties(
did_read = true;
} else if (prop == this->SelfEntries.PropertyName) {
static std::string output;
- output = cmJoin(this->SelfEntries.Entries, ";"_s);
+ output = cmList::to_string(this->SelfEntries.Entries);
value = cmValue(output);
did_read = true;
} else if (prop == this->InterfaceEntries.PropertyName) {
static std::string output;
- output = cmJoin(this->InterfaceEntries.Entries, ";"_s);
+ output = cmList::to_string(this->InterfaceEntries.Entries);
value = cmValue(output);
did_read = true;
} else if (cmHasPrefix(prop, this->DirectoryPrefix)) {
@@ -899,7 +899,7 @@ std::pair<bool, cmValue> UsageRequirementProperty::Read(
if (!this->Entries.empty()) {
// Storage to back the returned `cmValue`.
static std::string output;
- output = cmJoin(this->Entries, ";");
+ output = cmList::to_string(this->Entries);
value = cmValue(output);
}
did_read = true;
@@ -2130,7 +2130,7 @@ cmValue cmTargetInternals::GetFileSetDirectories(
return nullptr;
}
static std::string output;
- output = cmJoin(fileSet->GetDirectoryEntries(), ";"_s);
+ output = cmList::to_string(fileSet->GetDirectoryEntries());
return cmValue(output);
}
@@ -2150,7 +2150,7 @@ cmValue cmTargetInternals::GetFileSetPaths(cmTarget const* self,
return nullptr;
}
static std::string output;
- output = cmJoin(fileSet->GetFileEntries(), ";"_s);
+ output = cmList::to_string(fileSet->GetFileEntries());
return cmValue(output);
}
@@ -2495,7 +2495,7 @@ cmValue cmTarget::GetProperty(const std::string& prop) const
[](const BT<std::pair<std::string, bool>>& item) -> std::string {
return item.Value.first;
});
- output = cmJoin(utilities, ";");
+ output = cmList::to_string(utilities);
return cmValue(output);
}
if (prop == propIMPORTED) {
@@ -2779,6 +2779,8 @@ std::string cmTarget::ImportedGetFullPath(
case cmStateEnums::RuntimeBinaryArtifact:
if (loc) {
result = *loc;
+ } else if (imp) {
+ result = *imp;
} else {
std::string impProp = cmStrCat("IMPORTED_LOCATION", suffix);
if (cmValue config_location = this->GetProperty(impProp)) {
@@ -2787,6 +2789,16 @@ std::string cmTarget::ImportedGetFullPath(
this->GetProperty("IMPORTED_LOCATION")) {
result = *location;
}
+ if (result.empty() &&
+ (this->GetType() == cmStateEnums::SHARED_LIBRARY ||
+ this->IsExecutableWithExports())) {
+ impProp = cmStrCat("IMPORTED_IMPLIB", suffix);
+ if (cmValue config_implib = this->GetProperty(impProp)) {
+ result = *config_implib;
+ } else if (cmValue implib = this->GetProperty("IMPORTED_IMPLIB")) {
+ result = *implib;
+ }
+ }
}
break;
@@ -2812,7 +2824,10 @@ std::string cmTarget::ImportedGetFullPath(
std::string unset;
std::string configuration;
- if (artifact == cmStateEnums::RuntimeBinaryArtifact) {
+ if (this->GetType() == cmStateEnums::SHARED_LIBRARY &&
+ artifact == cmStateEnums::RuntimeBinaryArtifact) {
+ unset = "IMPORTED_LOCATION or IMPORTED_IMPLIB";
+ } else if (artifact == cmStateEnums::RuntimeBinaryArtifact) {
unset = "IMPORTED_LOCATION";
} else if (artifact == cmStateEnums::ImportLibraryArtifact) {
unset = "IMPORTED_IMPLIB";
@@ -2985,11 +3000,10 @@ bool cmTarget::GetMappedConfig(std::string const& desired_config, cmValue& loc,
}
// If we needed to find one of the mapped configurations but did not
- // On a DLL platform there may be only IMPORTED_IMPLIB for a shared
- // library or an executable with exports.
- bool allowImp = (this->IsDLLPlatform() &&
- (this->GetType() == cmStateEnums::SHARED_LIBRARY ||
- this->IsExecutableWithExports())) ||
+ // There may be only IMPORTED_IMPLIB for a shared library or an executable
+ // with exports.
+ bool allowImp = (this->GetType() == cmStateEnums::SHARED_LIBRARY ||
+ this->IsExecutableWithExports()) ||
(this->IsAIX() && this->IsExecutableWithExports()) ||
(this->GetMakefile()->PlatformSupportsAppleTextStubs() &&
this->IsSharedLibraryWithExports());