Ceres: tweak namespace for hash classes for MSVC2010
Not sure if it'll solve all issues, but at least it should reduce amount of errors. Also added missed patch from previous commit.
This commit is contained in:
14
extern/libmv/third_party/ceres/CMakeLists.txt
vendored
14
extern/libmv/third_party/ceres/CMakeLists.txt
vendored
@@ -231,14 +231,24 @@ endif()
|
|||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-DCERES_HAVE_PTHREAD
|
-DCERES_HAVE_PTHREAD
|
||||||
-D"CERES_HASH_NAMESPACE_START=namespace std { namespace tr1 {"
|
|
||||||
-D"CERES_HASH_NAMESPACE_END=}}"
|
|
||||||
-DCERES_NO_SUITESPARSE
|
-DCERES_NO_SUITESPARSE
|
||||||
-DCERES_NO_CXSPARSE
|
-DCERES_NO_CXSPARSE
|
||||||
-DCERES_NO_PROTOCOL_BUFFERS
|
-DCERES_NO_PROTOCOL_BUFFERS
|
||||||
-DCERES_RESTRICT_SCHUR_SPECIALIZATION
|
-DCERES_RESTRICT_SCHUR_SPECIALIZATION
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(MSVC10)
|
||||||
|
add_definitions(
|
||||||
|
-D"CERES_HASH_NAMESPACE_START=namespace std {"
|
||||||
|
-D"CERES_HASH_NAMESPACE_END=}"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
add_definitions(
|
||||||
|
-D"CERES_HASH_NAMESPACE_START=namespace std { namespace tr1 {"
|
||||||
|
-D"CERES_HASH_NAMESPACE_END=}}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
if( STREQUAL "10.5")
|
if( STREQUAL "10.5")
|
||||||
add_definitions(
|
add_definitions(
|
||||||
|
14
extern/libmv/third_party/ceres/bundle.sh
vendored
14
extern/libmv/third_party/ceres/bundle.sh
vendored
@@ -156,14 +156,24 @@ endif()
|
|||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-DCERES_HAVE_PTHREAD
|
-DCERES_HAVE_PTHREAD
|
||||||
-D"CERES_HASH_NAMESPACE_START=namespace std { namespace tr1 {"
|
|
||||||
-D"CERES_HASH_NAMESPACE_END=}}"
|
|
||||||
-DCERES_NO_SUITESPARSE
|
-DCERES_NO_SUITESPARSE
|
||||||
-DCERES_NO_CXSPARSE
|
-DCERES_NO_CXSPARSE
|
||||||
-DCERES_NO_PROTOCOL_BUFFERS
|
-DCERES_NO_PROTOCOL_BUFFERS
|
||||||
-DCERES_RESTRICT_SCHUR_SPECIALIZATION
|
-DCERES_RESTRICT_SCHUR_SPECIALIZATION
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(MSVC10)
|
||||||
|
add_definitions(
|
||||||
|
-D"CERES_HASH_NAMESPACE_START=namespace std {"
|
||||||
|
-D"CERES_HASH_NAMESPACE_END=}"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
add_definitions(
|
||||||
|
-D"CERES_HASH_NAMESPACE_START=namespace std { namespace tr1 {"
|
||||||
|
-D"CERES_HASH_NAMESPACE_END=}}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
if(${CMAKE_OSX_DEPLOYMENT_TARGET} STREQUAL "10.5")
|
if(${CMAKE_OSX_DEPLOYMENT_TARGET} STREQUAL "10.5")
|
||||||
add_definitions(
|
add_definitions(
|
||||||
|
50
extern/libmv/third_party/ceres/patches/msvc_glog_fix.patch
vendored
Normal file
50
extern/libmv/third_party/ceres/patches/msvc_glog_fix.patch
vendored
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
diff --git a/internal/ceres/block_random_access_dense_matrix.cc b/internal/ceres/block_random_access_dense_matrix.cc
|
||||||
|
index aedfc74..0f95e89 100644
|
||||||
|
--- a/internal/ceres/block_random_access_dense_matrix.cc
|
||||||
|
+++ b/internal/ceres/block_random_access_dense_matrix.cc
|
||||||
|
@@ -28,12 +28,12 @@
|
||||||
|
//
|
||||||
|
// Author: sameeragarwal@google.com (Sameer Agarwal)
|
||||||
|
|
||||||
|
+#include "glog/logging.h"
|
||||||
|
#include "ceres/block_random_access_dense_matrix.h"
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include "ceres/internal/eigen.h"
|
||||||
|
#include "ceres/internal/scoped_ptr.h"
|
||||||
|
-#include "glog/logging.h"
|
||||||
|
|
||||||
|
namespace ceres {
|
||||||
|
namespace internal {
|
||||||
|
diff --git a/internal/ceres/block_random_access_sparse_matrix.cc b/internal/ceres/block_random_access_sparse_matrix.cc
|
||||||
|
index f789436..9ed62ce 100644
|
||||||
|
--- a/internal/ceres/block_random_access_sparse_matrix.cc
|
||||||
|
+++ b/internal/ceres/block_random_access_sparse_matrix.cc
|
||||||
|
@@ -28,6 +28,7 @@
|
||||||
|
//
|
||||||
|
// Author: sameeragarwal@google.com (Sameer Agarwal)
|
||||||
|
|
||||||
|
+#include "glog/logging.h"
|
||||||
|
#include "ceres/block_random_access_sparse_matrix.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
@@ -39,7 +40,6 @@
|
||||||
|
#include "ceres/mutex.h"
|
||||||
|
#include "ceres/triplet_sparse_matrix.h"
|
||||||
|
#include "ceres/types.h"
|
||||||
|
-#include "glog/logging.h"
|
||||||
|
|
||||||
|
namespace ceres {
|
||||||
|
namespace internal {
|
||||||
|
diff --git a/internal/ceres/schur_complement_solver.cc b/internal/ceres/schur_complement_solver.cc
|
||||||
|
index b9224d8..2cbe78d 100644
|
||||||
|
--- a/internal/ceres/schur_complement_solver.cc
|
||||||
|
+++ b/internal/ceres/schur_complement_solver.cc
|
||||||
|
@@ -38,6 +38,7 @@
|
||||||
|
#endif // CERES_NO_CXSPARSE
|
||||||
|
|
||||||
|
#include "Eigen/Dense"
|
||||||
|
+#include "glog/logging.h"
|
||||||
|
#include "ceres/block_random_access_dense_matrix.h"
|
||||||
|
#include "ceres/block_random_access_matrix.h"
|
||||||
|
#include "ceres/block_random_access_sparse_matrix.h"
|
@@ -1 +1,2 @@
|
|||||||
collections_port.h.mingw.patch
|
collections_port.h.mingw.patch
|
||||||
|
msvc_glog_fix.patch
|
||||||
|
Reference in New Issue
Block a user