summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2022-03-22 16:07:16 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2022-03-25 11:29:28 (GMT)
commit1777883f8bcd0fe8cbdf88429d46530a05584a6c (patch)
tree04adb9a611b1fb38edff3522aef89e1a1041e3d1 /Source
parent232884345078a89d7f29fea2900be34c178bc10c (diff)
downloadCMake-1777883f8bcd0fe8cbdf88429d46530a05584a6c.zip
CMake-1777883f8bcd0fe8cbdf88429d46530a05584a6c.tar.gz
CMake-1777883f8bcd0fe8cbdf88429d46530a05584a6c.tar.bz2
genex-LINK_(LIBRARY|GROUP) features: update variables behavior
Variable CMAKE_LINK_(LIBRARY|GROUP)_USING_<FEATURE>_SUPPORTED is evaluated only if CMAKE_<LANG>_LINK_(LIBRARY|GROUP)_USING_<FEATURE>_SUPPORTED is not defined. This new behavior enable to activate a feature globally on a platform and to disable it for some compilers and languages.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmComputeLinkInformation.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 67214f1..a1ffc82 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -803,7 +803,9 @@ bool cmComputeLinkInformation::AddLibraryFeature(std::string const& feature)
cmStrCat("CMAKE_", this->LinkLanguage, "_LINK_LIBRARY_USING_", feature);
cmValue featureSupported =
this->Makefile->GetDefinition(cmStrCat(featureName, "_SUPPORTED"));
- if (!featureSupported.IsOn()) {
+ if (!featureSupported) {
+ // language specific variable is not defined, fallback to the more generic
+ // one
featureName = cmStrCat("CMAKE_LINK_LIBRARY_USING_", feature);
featureSupported =
this->Makefile->GetDefinition(cmStrCat(featureName, "_SUPPORTED"));
@@ -965,7 +967,9 @@ cmComputeLinkInformation::GetGroupFeature(std::string const& feature)
cmStrCat("CMAKE_", this->LinkLanguage, "_LINK_GROUP_USING_", feature);
cmValue featureSupported =
this->Makefile->GetDefinition(cmStrCat(featureName, "_SUPPORTED"));
- if (!featureSupported.IsOn()) {
+ if (!featureSupported) {
+ // language specific variable is not defined, fallback to the more generic
+ // one
featureName = cmStrCat("CMAKE_LINK_GROUP_USING_", feature);
featureSupported =
this->Makefile->GetDefinition(cmStrCat(featureName, "_SUPPORTED"));