summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-10-24 20:33:18 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-10-24 20:34:52 (GMT)
commitc15dc1972839e175afaa9011f74376dadf08277f (patch)
treef6c1dc85793438cc0337a7870e1bd33a81849077 /Source/cmTarget.cxx
parentf660832999e086f02a9f3552c028aed900cd7249 (diff)
downloadCMake-c15dc1972839e175afaa9011f74376dadf08277f.zip
CMake-c15dc1972839e175afaa9011f74376dadf08277f.tar.gz
CMake-c15dc1972839e175afaa9011f74376dadf08277f.tar.bz2
Introduce CM_UNORDERED_SET
Avoid duplicating switch among std::unordered_set, cmsys::hash_set, and std::set.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx13
1 files changed, 2 insertions, 11 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 6f47f85..25ae339 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -16,6 +16,7 @@
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmTargetPropertyComputer.h"
+#include "cm_unordered_set.hxx"
#include "cmake.h"
#include <algorithm>
@@ -26,16 +27,6 @@
#include <sstream>
#include <string.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
-
template <>
const char* cmTargetPropertyComputer::ComputeLocationForBuild<cmTarget>(
cmTarget const* tgt)
@@ -1145,7 +1136,7 @@ const char* cmTarget::GetComputedProperty(
const char* cmTarget::GetProperty(const std::string& prop) const
{
- static UNORDERED_SET<std::string> specialProps;
+ static CM_UNORDERED_SET<std::string> specialProps;
#define MAKE_STATIC_PROP(PROP) static const std::string prop##PROP = #PROP
MAKE_STATIC_PROP(LINK_LIBRARIES);
MAKE_STATIC_PROP(TYPE);