summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2023-12-06 08:03:24 (GMT)
committerBrad King <brad.king@kitware.com>2023-12-06 14:49:03 (GMT)
commit6b85c71ad8abffa7ea915e5dde8a809a0a4c493f (patch)
tree27f83e1970e60bb28fabf24c23d975c646aabe01 /Source
parent98cbe249189463a9f31ba3b3bdd37dfd0710753d (diff)
downloadCMake-6b85c71ad8abffa7ea915e5dde8a809a0a4c493f.zip
CMake-6b85c71ad8abffa7ea915e5dde8a809a0a4c493f.tar.gz
CMake-6b85c71ad8abffa7ea915e5dde8a809a0a4c493f.tar.bz2
Makefiles: Add LINK_WHAT_YOU_USE support for MODULE libraries
This was accidentally left out by Makefile generators. It already works with Ninja. Fixes: #25480
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 0429155..bc48a3b 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -218,6 +218,9 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink)
extraFlags, this->GeneratorTarget, linkLineComputer.get(),
this->GetConfigName());
+ this->UseLWYU = this->LocalGenerator->AppendLWYUFlags(
+ extraFlags, this->GeneratorTarget, linkLanguage);
+
this->WriteLibraryRules(linkRuleVar, extraFlags, relink);
}