Remove filtering of allowed INTERFACE library properties

Previously we disallowed use of arbitrary properties on INTERFACE
libraries.  The goal was to future-proof projects using them by not
allowing properties to be set that may affect their future inclusion in
the generated buildsystem.  In order to prepare to actually include
INTERFACE libraries in the generated buildsystem, drop the filter and
allow arbitrary properties to be set.

Issue: #19145
This commit is contained in:
Brad King
2020-07-14 13:55:38 -04:00
parent e7edba2baf
commit afb998704e
11 changed files with 6 additions and 163 deletions

View File

@@ -17,7 +17,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
#include "cmTargetPropertyComputer.h"
#include "cmTest.h"
#include "cmake.h"
@@ -364,12 +363,9 @@ bool HandleTargetMode(cmExecutionStatus& status, const std::string& name,
cmProp prop_cstr = nullptr;
cmListFileBacktrace bt = status.GetMakefile().GetBacktrace();
cmMessenger* messenger = status.GetMakefile().GetMessenger();
if (cmTargetPropertyComputer::PassesWhitelist(
target->GetType(), propertyName, messenger, bt)) {
prop_cstr = target->GetComputedProperty(propertyName, messenger, bt);
if (!prop_cstr) {
prop_cstr = target->GetProperty(propertyName);
}
prop_cstr = target->GetComputedProperty(propertyName, messenger, bt);
if (!prop_cstr) {
prop_cstr = target->GetProperty(propertyName);
}
return StoreResult(infoType, status.GetMakefile(), variable,
prop_cstr ? prop_cstr->c_str() : nullptr);