Build file macro for testing unordered_map C++ container support.
authorLukas Tönne <lukas.toenne@gmail.com>
Tue, 25 Mar 2014 08:21:30 +0000 (09:21 +0100)
committerLukas Tönne <lukas.toenne@gmail.com>
Tue, 25 Mar 2014 08:25:00 +0000 (09:25 +0100)
commitbbfcb0b1e44636b73b8c46f1cb800fa53dda5277
treeb24ce4191d24a44ae420870b0c2a3667d118f6ca
parent6452d9f02f07fb3aaa7c6601228ef96015a54996
Build file macro for testing unordered_map C++ container support.

Using unordered_map and unordered_set C++ container types currently
requires careful testing or usage of boost, due to the various confusing
C++ version differences in include paths and namespaces.

Libmv defines tests for these cases in cmake and scons, such that ceres
can use any available implementation, or fall back too std::map/std::set
if none can be found.

This patch generalizes this buildfile code by providing a Blender macro.
* cmake: defines both the variables used by libmv at them moment as well
as 2 variables UNORDERED_MAP_INCLUDE_PREFIX and UNORDERED_MAP_NAMESPACE,
which can later be used in other C++ parts for convenience.
* scons: adds a tool script returning the include prefix and namespace.
Libmv checks these to define the appropriate definitions for ceres.

Differential Revision: https://developer.blender.org/D425
build_files/cmake/macros.cmake
build_files/scons/tools/unordered_map.py [new file with mode: 0644]
extern/libmv/third_party/ceres/CMakeLists.txt
extern/libmv/third_party/ceres/SConscript