Made collections port compatible with MSVC2008
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 28 Nov 2013 17:24:55 +0000 (23:24 +0600)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 28 Nov 2013 17:28:11 +0000 (23:28 +0600)
commitb7bca8663ac86fbade802ce4d7c835f45bb98807
tree37593233eb54964fd44f33e19486a7951ed2501a
parent683093b5c8df391eac957cfe0c76c33d46c3503e
Made collections port compatible with MSVC2008

The issue was caused by the fact that in this version
of MSVC unordered_map class is defined in <unordered_map>
header file, but this file declares the class int std::tr1
namespace.

This confused existing assumption that if there's an
existing <unordered_map> file then class is declared
in std namespace.

Added an extra check to CMake which detects whether
it's std or std::tr1 which actually contains class
of unordered_map.

This might be changed/cleaned in the future, for
now committing to our repository to solve compilation
error on windows.

Details of the patch in upstream can be found there:

  https://ceres-solver-review.googlesource.com/#/c/4371/
extern/libmv/third_party/ceres/CMakeLists.txt
extern/libmv/third_party/ceres/SConscript
extern/libmv/third_party/ceres/bundle.sh
extern/libmv/third_party/ceres/internal/ceres/collections_port.h