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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-01-14 10:38:46 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-01-14 10:38:46 +0300
commit90e827ba660b3346d554e73c25bc1ad229fd736e (patch)
tree4559cfceb869d7791cfb94ddf2c706f8d75e9b8d
parent2af7637f207c420af602f43e514b1b20e7cfc718 (diff)
CMake: De-duplicate checks around unordered maps and shared pointer
Previously several areas were calling TEST_SHARED_PTR_SUPPORT and TEST_UNORDERED_MAP_SUPPORT which isn't that bad on it's own but was causing some quite verbose output with same information line printed multiple times. additionally, what's more worse, define flags for Ceres were duplicated in main CMakeLists and Ceres's CMakeLists. Now we've got a single place where checks for those classes are happening and other areas are simply checking for variables set by those check macros, keeping CMake output clean and nice.
-rw-r--r--CMakeLists.txt5
-rw-r--r--extern/ceres/CMakeLists.txt21
-rw-r--r--intern/cycles/CMakeLists.txt4
-rw-r--r--source/blender/depsgraph/CMakeLists.txt1
4 files changed, 6 insertions, 25 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 73d219e0e1c..e91f4b503a2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -731,6 +731,9 @@ if(HAVE_STDBOOL_H)
add_definitions(-DHAVE_STDBOOL_H)
endif()
+TEST_SHARED_PTR_SUPPORT()
+TEST_UNORDERED_MAP_SUPPORT()
+
if(WITH_AUDASPACE)
if(WITH_SYSTEM_AUDASPACE)
set(AUDASPACE_DEFINITIONS
@@ -2604,7 +2607,6 @@ endif()
if(WITH_LIBMV)
set(CERES_DEFINES)
- TEST_SHARED_PTR_SUPPORT()
if(SHARED_PTR_FOUND)
if(SHARED_PTR_TR1_MEMORY_HEADER)
list(APPEND CERES_DEFINES -DCERES_TR1_MEMORY_HEADER)
@@ -2616,7 +2618,6 @@ if(WITH_LIBMV)
message(FATAL_ERROR "Ceres: Unable to find shared_ptr.")
endif()
- TEST_UNORDERED_MAP_SUPPORT()
if(HAVE_STD_UNORDERED_MAP_HEADER)
if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
list(APPEND CERES_DEFINES -DCERES_STD_UNORDERED_MAP)
diff --git a/extern/ceres/CMakeLists.txt b/extern/ceres/CMakeLists.txt
index 711b2ef69f2..2ad8c543088 100644
--- a/extern/ceres/CMakeLists.txt
+++ b/extern/ceres/CMakeLists.txt
@@ -326,25 +326,4 @@ if(WITH_OPENMP)
)
endif()
-TEST_UNORDERED_MAP_SUPPORT()
-if(HAVE_STD_UNORDERED_MAP_HEADER)
- if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
- add_definitions(-DCERES_STD_UNORDERED_MAP)
- else()
- if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
- add_definitions(-DCERES_STD_UNORDERED_MAP_IN_TR1_NAMESPACE)
- else()
- add_definitions(-DCERES_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(-DCERES_TR1_UNORDERED_MAP)
- else()
- add_definitions(-DCERES_NO_UNORDERED_MAP)
- message(STATUS "Replacing unordered_map/set with map/set (warning: slower!)")
- endif()
-endif()
-
blender_add_lib(extern_ceres "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index 3df9a670f7d..c118f4cd015 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -157,7 +157,9 @@ add_definitions(
-DWITH_MULTI
)
-TEST_UNORDERED_MAP_SUPPORT()
+if(CYCLES_STANDALONE_REPOSITORY)
+ TEST_UNORDERED_MAP_SUPPORT()
+endif()
if(HAVE_STD_UNORDERED_MAP_HEADER)
if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
add_definitions(-DCYCLES_STD_UNORDERED_MAP)
diff --git a/source/blender/depsgraph/CMakeLists.txt b/source/blender/depsgraph/CMakeLists.txt
index f3ff709e98b..e1dc8b020fb 100644
--- a/source/blender/depsgraph/CMakeLists.txt
+++ b/source/blender/depsgraph/CMakeLists.txt
@@ -83,7 +83,6 @@ set(SRC
util/depsgraph_util_transitive.h
)
-TEST_UNORDERED_MAP_SUPPORT()
if(HAVE_STD_UNORDERED_MAP_HEADER)
if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
add_definitions(-DDEG_STD_UNORDERED_MAP)