diff options
author | Brad King <brad.king@kitware.com> | 2021-02-24 14:45:37 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-02-24 14:45:50 (GMT) |
commit | 14c6a88db6ed5683688b1d9211f2466faa0e563d (patch) | |
tree | 4da5b87c0fe174b078c035decd3225126e7c8a97 /Source | |
parent | 261ba006682a064177fc1d9beee9c5ec0f3ea378 (diff) | |
parent | b722eea9253acd9e33921779175fc615d064577a (diff) | |
download | CMake-14c6a88db6ed5683688b1d9211f2466faa0e563d.zip CMake-14c6a88db6ed5683688b1d9211f2466faa0e563d.tar.gz CMake-14c6a88db6ed5683688b1d9211f2466faa0e563d.tar.bz2 |
Merge topic 'LINK_LANGUAGE-genex-respects-LINKER_LANGUAGE-property' into release-3.20
b722eea925 Genex: LINK_LANGUAGE respects LINKER_LANGUAGE property
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5841
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 9235faa..d7e9952 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -2648,8 +2648,12 @@ void cmGeneratorTarget::ComputeLinkClosure(const std::string& config, LinkClosure linkClosure; linkClosure.LinkerLanguage = this->LinkerLanguage; + bool hasHardCodedLinkerLanguage = this->Target->GetProperty("HAS_CXX") || + !this->Target->GetSafeProperty("LINKER_LANGUAGE").empty(); + // Get languages built in this target. - secondPass = this->ComputeLinkClosure(config, linkClosure, false); + secondPass = this->ComputeLinkClosure(config, linkClosure, false) && + !hasHardCodedLinkerLanguage; this->LinkerLanguage = linkClosure.LinkerLanguage; if (!secondPass) { lc = std::move(linkClosure); |