44 lines
1.6 KiB
Diff
44 lines
1.6 KiB
Diff
|
From 74b1d6caf31d9921b8311012ead4497865e77396 Mon Sep 17 00:00:00 2001
|
||
|
From: Ben Boeckel <ben.boeckel@kitware.com>
|
||
|
Date: Tue, 5 Sep 2023 15:56:03 -0400
|
||
|
Subject: [PATCH 4/9] cmComputeLinkInformation: compute link info for
|
||
|
module-using targets
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
Targets which contain C++ module or Fortran sources need to participate
|
||
|
in link information unconditionally regardless of whether they actually
|
||
|
have link artifacts or not.
|
||
|
|
||
|
Fixes: #25223
|
||
|
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
|
||
|
---
|
||
|
Source/cmComputeLinkInformation.cxx | 7 +++++--
|
||
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
|
||
|
index ebbb88f6a2..4804565840 100644
|
||
|
--- a/Source/cmComputeLinkInformation.cxx
|
||
|
+++ b/Source/cmComputeLinkInformation.cxx
|
||
|
@@ -533,11 +533,14 @@ cmComputeLinkInformation::GetObjectLibrariesLinked() const
|
||
|
|
||
|
bool cmComputeLinkInformation::Compute()
|
||
|
{
|
||
|
- // Skip targets that do not link.
|
||
|
+ // Skip targets that do not link or have link-like information consumers may
|
||
|
+ // need (namely modules).
|
||
|
if (!(this->Target->GetType() == cmStateEnums::EXECUTABLE ||
|
||
|
this->Target->GetType() == cmStateEnums::SHARED_LIBRARY ||
|
||
|
this->Target->GetType() == cmStateEnums::MODULE_LIBRARY ||
|
||
|
- this->Target->GetType() == cmStateEnums::STATIC_LIBRARY)) {
|
||
|
+ this->Target->GetType() == cmStateEnums::STATIC_LIBRARY ||
|
||
|
+ this->Target->HaveCxx20ModuleSources() ||
|
||
|
+ this->Target->HaveFortranSources())) {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
--
|
||
|
2.41.0
|
||
|
|