mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 20:00:51 -05:00
Introduce CM_UNORDERED_SET
Avoid duplicating switch among std::unordered_set, cmsys::hash_set, and std::set.
This commit is contained in:
@@ -10,16 +10,7 @@
|
||||
#include "cmSourceFile.h"
|
||||
#include "cmSourceFileLocation.h"
|
||||
#include "cmTarget.h"
|
||||
|
||||
#if defined(CMake_HAVE_CXX_UNORDERED_SET)
|
||||
#include <unordered_set>
|
||||
#define UNORDERED_SET std::unordered_set
|
||||
#elif defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
#include <cmsys/hash_set.hxx>
|
||||
#define UNORDERED_SET cmsys::hash_set
|
||||
#else
|
||||
#define UNORDERED_SET std::set
|
||||
#endif
|
||||
#include "cm_unordered_set.hxx"
|
||||
|
||||
bool cmTargetPropertyComputer::HandleLocationPropertyPolicy(
|
||||
std::string const& tgtName, cmMessenger* messenger,
|
||||
@@ -59,7 +50,7 @@ bool cmTargetPropertyComputer::WhiteListedInterfaceProperty(
|
||||
if (cmHasLiteralPrefix(prop, "INTERFACE_")) {
|
||||
return true;
|
||||
}
|
||||
static UNORDERED_SET<std::string> builtIns;
|
||||
static CM_UNORDERED_SET<std::string> builtIns;
|
||||
if (builtIns.empty()) {
|
||||
builtIns.insert("COMPATIBLE_INTERFACE_BOOL");
|
||||
builtIns.insert("COMPATIBLE_INTERFACE_NUMBER_MAX");
|
||||
|
||||
Reference in New Issue
Block a user