1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 19:08:07 +08:00

Linker: Honor CMAKE_<LANG>_LINK_LIBRARY_USING_FEATURE_SUPPORTED when FALSE

It is documented to override `CMAKE_LINK_LIBRARY_USING_FEATURE_SUPPORTED`.
This commit is contained in:
Marc Chevrier
2025-03-14 15:32:00 +01:00
committed by Brad King
parent e4bf5e4a53
commit 3f5f2b2d49

View File

@@ -193,8 +193,8 @@ bool IsFeatureSupported(cmMakefile* makefile, std::string const& linkLanguage,
{ {
auto featureSupported = cmStrCat( auto featureSupported = cmStrCat(
"CMAKE_", linkLanguage, "_LINK_LIBRARY_USING_", feature, "_SUPPORTED"); "CMAKE_", linkLanguage, "_LINK_LIBRARY_USING_", feature, "_SUPPORTED");
if (makefile->GetDefinition(featureSupported).IsOn()) { if (cmValue perLangVar = makefile->GetDefinition(featureSupported)) {
return true; return perLangVar.IsOn();
} }
featureSupported = featureSupported =