|
@@ -2045,35 +2045,37 @@ std::string cmTarget::ImportedGetFullPath(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (result.empty()) {
|
|
if (result.empty()) {
|
|
|
- auto message = [&]() -> std::string {
|
|
|
|
|
- std::string unset;
|
|
|
|
|
- std::string configuration;
|
|
|
|
|
-
|
|
|
|
|
- if (artifact == cmStateEnums::RuntimeBinaryArtifact) {
|
|
|
|
|
- unset = "IMPORTED_LOCATION";
|
|
|
|
|
- } else if (artifact == cmStateEnums::ImportLibraryArtifact) {
|
|
|
|
|
- unset = "IMPORTED_IMPLIB";
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (!config.empty()) {
|
|
|
|
|
- configuration = cmStrCat(" configuration \"", config, "\"");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY) {
|
|
|
|
|
+ auto message = [&]() -> std::string {
|
|
|
|
|
+ std::string unset;
|
|
|
|
|
+ std::string configuration;
|
|
|
|
|
+
|
|
|
|
|
+ if (artifact == cmStateEnums::RuntimeBinaryArtifact) {
|
|
|
|
|
+ unset = "IMPORTED_LOCATION";
|
|
|
|
|
+ } else if (artifact == cmStateEnums::ImportLibraryArtifact) {
|
|
|
|
|
+ unset = "IMPORTED_IMPLIB";
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- return cmStrCat(unset, " not set for imported target \"",
|
|
|
|
|
- this->GetName(), "\"", configuration, ".");
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ if (!config.empty()) {
|
|
|
|
|
+ configuration = cmStrCat(" configuration \"", config, "\"");
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- switch (this->GetPolicyStatus(cmPolicies::CMP0111)) {
|
|
|
|
|
- case cmPolicies::WARN:
|
|
|
|
|
- impl->Makefile->IssueMessage(
|
|
|
|
|
- MessageType::AUTHOR_WARNING,
|
|
|
|
|
- cmPolicies::GetPolicyWarning(cmPolicies::CMP0111) + "\n" +
|
|
|
|
|
- message());
|
|
|
|
|
- CM_FALLTHROUGH;
|
|
|
|
|
- case cmPolicies::OLD:
|
|
|
|
|
- break;
|
|
|
|
|
- default:
|
|
|
|
|
- impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, message());
|
|
|
|
|
|
|
+ return cmStrCat(unset, " not set for imported target \"",
|
|
|
|
|
+ this->GetName(), "\"", configuration, ".");
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ switch (this->GetPolicyStatus(cmPolicies::CMP0111)) {
|
|
|
|
|
+ case cmPolicies::WARN:
|
|
|
|
|
+ impl->Makefile->IssueMessage(
|
|
|
|
|
+ MessageType::AUTHOR_WARNING,
|
|
|
|
|
+ cmPolicies::GetPolicyWarning(cmPolicies::CMP0111) + "\n" +
|
|
|
|
|
+ message());
|
|
|
|
|
+ CM_FALLTHROUGH;
|
|
|
|
|
+ case cmPolicies::OLD:
|
|
|
|
|
+ break;
|
|
|
|
|
+ default:
|
|
|
|
|
+ impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, message());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
result = cmStrCat(this->GetName(), "-NOTFOUND");
|
|
result = cmStrCat(this->GetName(), "-NOTFOUND");
|