From 3f5f2b2d4903c3f0fdbcc31be6c65d2d094d67ff Mon Sep 17 00:00:00 2001 From: Marc Chevrier Date: Fri, 14 Mar 2025 15:32:00 +0100 Subject: Linker: Honor CMAKE__LINK_LIBRARY_USING_FEATURE_SUPPORTED when FALSE It is documented to override `CMAKE_LINK_LIBRARY_USING_FEATURE_SUPPORTED`. --- Source/cmComputeLinkDepends.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index f3057b4..6b97280 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -193,8 +193,8 @@ bool IsFeatureSupported(cmMakefile* makefile, std::string const& linkLanguage, { auto featureSupported = cmStrCat( "CMAKE_", linkLanguage, "_LINK_LIBRARY_USING_", feature, "_SUPPORTED"); - if (makefile->GetDefinition(featureSupported).IsOn()) { - return true; + if (cmValue perLangVar = makefile->GetDefinition(featureSupported)) { + return perLangVar.IsOn(); } featureSupported = -- cgit v0.12