diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-10-12 22:18:24 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-10-15 09:14:21 (GMT) |
commit | 05251e6d80b03ae14d6a89765f14c2eb10979bd4 (patch) | |
tree | 02813e4d853ef97582de7d4c6c0dd6f97e61cbb1 /Source/cmTargetPropertyComputer.cxx | |
parent | fbf1721c94b40ea86eeb183a1916f2066eb64bdc (diff) | |
download | CMake-05251e6d80b03ae14d6a89765f14c2eb10979bd4.zip CMake-05251e6d80b03ae14d6a89765f14c2eb10979bd4.tar.gz CMake-05251e6d80b03ae14d6a89765f14c2eb10979bd4.tar.bz2 |
cmTargetPropertyComputer: Move whitelist check from cmTarget
Diffstat (limited to 'Source/cmTargetPropertyComputer.cxx')
-rw-r--r-- | Source/cmTargetPropertyComputer.cxx | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx index f15cb43..18135fa 100644 --- a/Source/cmTargetPropertyComputer.cxx +++ b/Source/cmTargetPropertyComputer.cxx @@ -154,7 +154,7 @@ const char* cmTargetPropertyComputer::GetLocation( } const char* cmTargetPropertyComputer::GetSources( - cmTarget const* tgt,cmMessenger* messenger, + cmTarget const* tgt, cmMessenger* messenger, cmListFileBacktrace const& context) { cmStringRange entries = tgt->GetSourceEntries(); @@ -241,3 +241,32 @@ const char* cmTargetPropertyComputer::GetSources( srcs = ss.str(); return srcs.c_str(); } + +bool cmTargetPropertyComputer::WhiteListedInterfaceProperty( + const std::string& prop) +{ + if (cmHasLiteralPrefix(prop, "INTERFACE_")) { + return true; + } + static UNORDERED_SET<std::string> builtIns; + if (builtIns.empty()) { + builtIns.insert("COMPATIBLE_INTERFACE_BOOL"); + builtIns.insert("COMPATIBLE_INTERFACE_NUMBER_MAX"); + builtIns.insert("COMPATIBLE_INTERFACE_NUMBER_MIN"); + builtIns.insert("COMPATIBLE_INTERFACE_STRING"); + builtIns.insert("EXPORT_NAME"); + builtIns.insert("IMPORTED"); + builtIns.insert("NAME"); + builtIns.insert("TYPE"); + } + + if (builtIns.count(prop)) { + return true; + } + + if (cmHasLiteralPrefix(prop, "MAP_IMPORTED_CONFIG_")) { + return true; + } + + return false; +} |