CMake: De-duplicate checks around unordered maps and shared pointer
[blender.git] / CMakeLists.txt
index 73d219e0e1c113719b5b950dc23103026dd28325..e91f4b503a23b51d88eac6c001c41c4d4239e23f 100644 (file)
@@ -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)