From f01456aaa4a87cd76feaef50ec822340197f9eda Mon Sep 17 00:00:00 2001 From: Martijn Berger Date: Sun, 29 Mar 2015 22:12:22 +0200 Subject: Optionally use c++11 stuff instead of boost in cycles where possible. We do and continue to depend on boost though Reviewers: dingto, sergey Reviewed By: sergey Subscribers: #cycles Differential Revision: https://developer.blender.org/D1185 --- intern/cycles/CMakeLists.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'intern/cycles/CMakeLists.txt') diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index 2ba6af48d0d..c4cadfe0bf7 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -152,6 +152,27 @@ add_definitions( -DWITH_MULTI ) +TEST_UNORDERED_MAP_SUPPORT() +if(HAVE_STD_UNORDERED_MAP_HEADER) + if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE) + add_definitions(-DCYCLES_STD_UNORDERED_MAP) + else() + if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE) + add_definitions(-DCYCLES_STD_UNORDERED_MAP_IN_TR1_NAMESPACE) + else() + add_definitions(-DCYCLES_NO_UNORDERED_MAP) + message(STATUS "Replacing unordered_map/set with map/set (warning: slower!)") + endif() + endif() +else() + if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE) + add_definitions(-DCYCLES_TR1_UNORDERED_MAP) + else() + add_definitions(-DCYCLES_NO_UNORDERED_MAP) + message(STATUS "Replacing unordered_map/set with map/set (warning: slower!)") + endif() +endif() + # Logging capabilities using GLog library. if(WITH_CYCLES_LOGGING) add_definitions(-DWITH_CYCLES_LOGGING) -- cgit v1.2.3