Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/libmv/third_party/ceres/SConscript')
-rw-r--r--extern/libmv/third_party/ceres/SConscript12
1 files changed, 12 insertions, 0 deletions
diff --git a/extern/libmv/third_party/ceres/SConscript b/extern/libmv/third_party/ceres/SConscript
index 22960e7b3bd..2573a9742ad 100644
--- a/extern/libmv/third_party/ceres/SConscript
+++ b/extern/libmv/third_party/ceres/SConscript
@@ -29,16 +29,28 @@ if env['WITH_BF_OPENMP']:
conf = Configure(env)
if conf.CheckCXXHeader("unordered_map"):
+ # Even so we've found unordered_map header file it doesn't
+ # mean unordered_map and unordered_set will be declared in
+ # std namespace.
+ #
+ # Namely, MSVC 2008 have unordered_map header which declares
+ # unordered_map class in std::tr1 namespace. In order to support
+ # this, we do extra check to see which exactly namespace is
+ # to be used.
+
if conf.CheckType('std::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
defs.append('CERES_STD_UNORDERED_MAP')
+ print("-- Found unordered_map/set in std namespace.")
elif conf.CheckType('std::tr1::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
defs.append('CERES_STD_UNORDERED_MAP_IN_TR1_NAMESPACE')
+ print("-- Found unordered_map/set in std::tr1 namespace.")
else:
print("-- Found <unordered_map> but can not find neither std::unordered_map nor std::tr1::unordered_map.")
print("-- Replacing unordered_map/set with map/set (warning: slower!)")
defs.append('CERES_NO_UNORDERED_MAP')
elif conf.CheckCXXHeader("tr1/unordered_map"):
defs.append('CERES_TR1_UNORDERED_MAP')
+ print("-- Found unordered_map/set in std::tr1 namespace.")
else:
print("-- Unable to find <unordered_map> or <tr1/unordered_map>. ")
print("-- Replacing unordered_map/set with map/set (warning: slower!)")