summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetPropertyComputer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTargetPropertyComputer.cxx')
-rw-r--r--Source/cmTargetPropertyComputer.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx
index 18135fa..3e39a8f 100644
--- a/Source/cmTargetPropertyComputer.cxx
+++ b/Source/cmTargetPropertyComputer.cxx
@@ -270,3 +270,19 @@ bool cmTargetPropertyComputer::WhiteListedInterfaceProperty(
return false;
}
+
+bool cmTargetPropertyComputer::PassesWhitelist(
+ cmState::TargetType tgtType, std::string const& prop, cmMessenger* messenger,
+ cmListFileBacktrace const& context)
+{
+ if (tgtType == cmState::INTERFACE_LIBRARY &&
+ !WhiteListedInterfaceProperty(prop)) {
+ std::ostringstream e;
+ e << "INTERFACE_LIBRARY targets may only have whitelisted properties. "
+ "The property \""
+ << prop << "\" is not allowed.";
+ messenger->IssueMessage(cmake::FATAL_ERROR, e.str(), context);
+ return false;
+ }
+ return true;
+}