From 2b73402547a7c765f302a0d4218f96b5a710e96f Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 16 May 2016 20:03:59 +0200 Subject: Fix C++11 build issues on OS X, remove references to outdated libs. --- intern/cycles/CMakeLists.txt | 4 +++- intern/cycles/bvh/bvh_build.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'intern') diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index 3b6c25c370e..efc36f0e6b8 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -153,7 +153,9 @@ set(WITH_CYCLES_DEVICE_MULTI TRUE) if(CYCLES_STANDALONE_REPOSITORY) TEST_UNORDERED_MAP_SUPPORT() endif() -if(HAVE_STD_UNORDERED_MAP_HEADER) +if(WITH_CXX11) + add_definitions(-DCYCLES_STD_UNORDERED_MAP) +elseif(HAVE_STD_UNORDERED_MAP_HEADER) if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE) add_definitions(-DCYCLES_STD_UNORDERED_MAP) else() diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp index 63edbc9998f..6af4d25eefc 100644 --- a/intern/cycles/bvh/bvh_build.cpp +++ b/intern/cycles/bvh/bvh_build.cpp @@ -607,8 +607,10 @@ BVHNode* BVHBuild::create_leaf_node(const BVHRange& range, vector p_type[PRIMITIVE_NUM_TOTAL]; vector p_index[PRIMITIVE_NUM_TOTAL]; vector p_object[PRIMITIVE_NUM_TOTAL]; + /* TODO(sergey): In theory we should be able to store references. */ - vector object_references; + typedef StackAllocator<256, BVHReference> LeafReferenceStackAllocator; + vector object_references; uint visibility[PRIMITIVE_NUM_TOTAL] = {0}; /* NOTE: Keep initializtion in sync with actual number of primitives. */ -- cgit v1.2.3