diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-06-04 10:17:45 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-06-04 16:11:19 (GMT) |
commit | 8af4b31b8ac44c87629fabec22d87e1e6e41f73f (patch) | |
tree | 708e097254aaa729fa9f008063db043a9355cc70 /Source/cmTargetPropertyComputer.cxx | |
parent | 537ea119b9d65d8723b6df8a7ba71f29466c0f63 (diff) | |
download | CMake-8af4b31b8ac44c87629fabec22d87e1e6e41f73f.zip CMake-8af4b31b8ac44c87629fabec22d87e1e6e41f73f.tar.gz CMake-8af4b31b8ac44c87629fabec22d87e1e6e41f73f.tar.bz2 |
cmTargetPropertyComputer: Initialize static std::unordered_set on construction
Diffstat (limited to 'Source/cmTargetPropertyComputer.cxx')
-rw-r--r-- | Source/cmTargetPropertyComputer.cxx | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx index 3f763af..eac300f 100644 --- a/Source/cmTargetPropertyComputer.cxx +++ b/Source/cmTargetPropertyComputer.cxx @@ -56,22 +56,21 @@ bool cmTargetPropertyComputer::WhiteListedInterfaceProperty( if (std::islower(prop[0])) { return true; } - static std::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("EXPORT_PROPERTIES"); - builtIns.insert("IMPORTED"); - builtIns.insert("IMPORTED_GLOBAL"); - builtIns.insert("MANUALLY_ADDED_DEPENDENCIES"); - builtIns.insert("NAME"); - builtIns.insert("PRIVATE_HEADER"); - builtIns.insert("PUBLIC_HEADER"); - builtIns.insert("TYPE"); - } + static std::unordered_set<std::string> const builtIns{ + "COMPATIBLE_INTERFACE_BOOL", + "COMPATIBLE_INTERFACE_NUMBER_MAX", + "COMPATIBLE_INTERFACE_NUMBER_MIN", + "COMPATIBLE_INTERFACE_STRING", + "EXPORT_NAME", + "EXPORT_PROPERTIES", + "IMPORTED", + "IMPORTED_GLOBAL", + "MANUALLY_ADDED_DEPENDENCIES", + "NAME", + "PRIVATE_HEADER", + "PUBLIC_HEADER", + "TYPE" + }; if (builtIns.count(prop)) { return true; |