From 6e138d0069a7c3d82b7119781bd1a8e8087db141 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 17 Dec 2008 18:37:04 +0000 Subject: [PATCH] more MSVC cmake fixes --- CMakeLists.txt | 2 +- Eigen/Sparse | 2 ++ Eigen/src/Sparse/SparseMatrix.h | 33 ++++++++++++++++++++++++++------- test/CMakeLists.txt | 11 ++++++++--- test/main.h | 2 +- 5 files changed, 38 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b407d78d4..840ba6f53 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_SYSTEM_NAME MATCHES Linux) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -fno-exceptions -fno-check-new -fno-common -fstrict-aliasing") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wextra -fno-exceptions -fno-check-new -fno-common -fstrict-aliasing") if(NOT EIGEN_TEST_LIB) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") endif(NOT EIGEN_TEST_LIB) diff --git a/Eigen/Sparse b/Eigen/Sparse index b8a10c9e0..b48f0c093 100644 --- a/Eigen/Sparse +++ b/Eigen/Sparse @@ -100,6 +100,8 @@ namespace Eigen { # include "src/Sparse/UmfPackSupport.h" #endif +#include "src/Sparse/ConstrainedCG.h" + } // namespace Eigen #endif // EIGEN_SPARSE_MODULE_H diff --git a/Eigen/src/Sparse/SparseMatrix.h b/Eigen/src/Sparse/SparseMatrix.h index d58d910e8..5a6b2e0d4 100644 --- a/Eigen/src/Sparse/SparseMatrix.h +++ b/Eigen/src/Sparse/SparseMatrix.h @@ -128,6 +128,17 @@ class SparseMatrix class InnerIterator; + inline void setZero() + { + m_data.clear(); + //if (m_outerSize) + memset(m_outerIndex, 0, (m_outerSize+1)*sizeof(int)); +// for (int i=0; i