Commit 8af4b31b authored by Sebastian Holtermann's avatar Sebastian Holtermann

cmTargetPropertyComputer: Initialize static std::unordered_set on construction

parent 537ea119
...@@ -56,22 +56,21 @@ bool cmTargetPropertyComputer::WhiteListedInterfaceProperty( ...@@ -56,22 +56,21 @@ bool cmTargetPropertyComputer::WhiteListedInterfaceProperty(
if (std::islower(prop[0])) { if (std::islower(prop[0])) {
return true; return true;
} }
static std::unordered_set<std::string> builtIns; static std::unordered_set<std::string> const builtIns{
if (builtIns.empty()) { "COMPATIBLE_INTERFACE_BOOL",
builtIns.insert("COMPATIBLE_INTERFACE_BOOL"); "COMPATIBLE_INTERFACE_NUMBER_MAX",
builtIns.insert("COMPATIBLE_INTERFACE_NUMBER_MAX"); "COMPATIBLE_INTERFACE_NUMBER_MIN",
builtIns.insert("COMPATIBLE_INTERFACE_NUMBER_MIN"); "COMPATIBLE_INTERFACE_STRING",
builtIns.insert("COMPATIBLE_INTERFACE_STRING"); "EXPORT_NAME",
builtIns.insert("EXPORT_NAME"); "EXPORT_PROPERTIES",
builtIns.insert("EXPORT_PROPERTIES"); "IMPORTED",
builtIns.insert("IMPORTED"); "IMPORTED_GLOBAL",
builtIns.insert("IMPORTED_GLOBAL"); "MANUALLY_ADDED_DEPENDENCIES",
builtIns.insert("MANUALLY_ADDED_DEPENDENCIES"); "NAME",
builtIns.insert("NAME"); "PRIVATE_HEADER",
builtIns.insert("PRIVATE_HEADER"); "PUBLIC_HEADER",
builtIns.insert("PUBLIC_HEADER"); "TYPE"
builtIns.insert("TYPE"); };
}
if (builtIns.count(prop)) { if (builtIns.count(prop)) {
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment