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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-25 17:59:46 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-30 18:12:24 +0300
commit885cc4cf9a1d5c167e4cbd26c3294d8b1ad400d8 (patch)
treecb7f2b6ef98c6ce346f2378096bc9d32a3e5606e /source/blender/depsgraph
parentb59d85b5a56c020c7b86b0cca4dc38e4950550f9 (diff)
Build: require C11/C++11 for all operating systems in master.
This is in preparation of upgrading our library dependencies, some of which need C++11. We already use C++11 in blender2.8 and for Windows and macOS, so this just affects Linux. On many distributions this will not require any changes, on some install_deps.sh will need to be run again to rebuild libraries. Differential Revision: https://developer.blender.org/D3568
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/CMakeLists.txt22
-rw-r--r--source/blender/depsgraph/util/deg_util_foreach.h17
-rw-r--r--source/blender/depsgraph/util/deg_util_function.h73
3 files changed, 1 insertions, 111 deletions
diff --git a/source/blender/depsgraph/CMakeLists.txt b/source/blender/depsgraph/CMakeLists.txt
index 50c0910ef02..ced045e9e2f 100644
--- a/source/blender/depsgraph/CMakeLists.txt
+++ b/source/blender/depsgraph/CMakeLists.txt
@@ -100,28 +100,6 @@ set(SRC
util/deg_util_function.h
)
-if(WITH_CXX11)
- add_definitions(-DDEG_STD_UNORDERED_MAP)
-elseif(HAVE_STD_UNORDERED_MAP_HEADER)
- if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
- add_definitions(-DDEG_STD_UNORDERED_MAP)
- else()
- if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
- add_definitions(-DDEG_STD_UNORDERED_MAP_IN_TR1_NAMESPACE)
- else()
- add_definitions(-DDEG_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(-DDEG_TR1_UNORDERED_MAP)
- else()
- add_definitions(-DDEG_NO_UNORDERED_MAP)
- message(STATUS "Replacing unordered_map/set with map/set (warning: slower!)")
- endif()
-endif()
-
if(WITH_LEGACY_DEPSGRAPH)
add_definitions(-DWITH_LEGACY_DEPSGRAPH)
endif()
diff --git a/source/blender/depsgraph/util/deg_util_foreach.h b/source/blender/depsgraph/util/deg_util_foreach.h
index cb7361fc708..5484192207b 100644
--- a/source/blender/depsgraph/util/deg_util_foreach.h
+++ b/source/blender/depsgraph/util/deg_util_foreach.h
@@ -30,19 +30,4 @@
#pragma once
-#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
-# define foreach(x, y) for(x : y)
-#elif defined(HAVE_BOOST_FUNCTION_BINDINGS)
-# include <boost/foreach.hpp>
-# define foreach BOOST_FOREACH
-#else
-#pragma message("No available foreach() implementation. Using stub instead, disabling new depsgraph")
-
-#ifndef WITH_LEGACY_DEPSGRAPH
-# error "Unable to build new depsgraph and legacy one is disabled."
-#endif
-
-#define DISABLE_NEW_DEPSGRAPH
-
-# define foreach(x, y) for (x; false; (void)y)
-#endif
+#define foreach(x, y) for(x : y)
diff --git a/source/blender/depsgraph/util/deg_util_function.h b/source/blender/depsgraph/util/deg_util_function.h
index 38e753ce925..8863d92eb74 100644
--- a/source/blender/depsgraph/util/deg_util_function.h
+++ b/source/blender/depsgraph/util/deg_util_function.h
@@ -30,81 +30,8 @@
#pragma once
-#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1900)
-
#include <functional>
using std::function;
using namespace std::placeholders;
#define function_bind std::bind
-
-#elif defined(HAVE_BOOST_FUNCTION_BINDINGS)
-
-#include <boost/bind.hpp>
-#include <boost/function.hpp>
-
-using boost::function;
-#define function_bind boost::bind
-
-#else
-
-#pragma message("No available function binding implementation. Using stub instead, disabling new depsgraph")
-
-#ifndef WITH_LEGACY_DEPSGRAPH
-# error "Unable to build new depsgraph and legacy one is disabled."
-#endif
-
-#define DISABLE_NEW_DEPSGRAPH
-
-#include "BLI_utildefines.h"
-#include <cstdlib>
-
-template<typename T>
-class function {
-public:
- function() {};
- function(void *) {}
- operator bool() const { return false; }
- bool operator== (void *) { return false; }
-
- template<typename T1>
- void operator() (T1) {
- BLI_assert(!"Should not be used");
- }
-};
-
-class Wrap {
-public:
- Wrap() {}
- template <typename T>
- Wrap(T /*arg*/) {}
-};
-
-template <typename T>
-void *function_bind(T func,
- Wrap arg1 = Wrap(),
- Wrap arg2 = Wrap(),
- Wrap arg3 = Wrap(),
- Wrap arg4 = Wrap(),
- Wrap arg5 = Wrap(),
- Wrap arg6 = Wrap(),
- Wrap arg7 = Wrap())
-{
- BLI_assert(!"Should not be used");
- (void)func;
- (void)arg1;
- (void)arg2;
- (void)arg3;
- (void)arg4;
- (void)arg5;
- (void)arg6;
- (void)arg7;
- return NULL;
-}
-
-#define _1 Wrap()
-#define _2 Wrap()
-#define _3 Wrap()
-#define _4 Wrap()
-
-#endif