aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt22
-rw-r--r--Eigen/src/Core/util/Macros.h4
-rw-r--r--cmake/FindEigen3.cmake80
-rw-r--r--doc/C01_QuickStartGuide.dox2
-rw-r--r--doc/D11_UnalignedArrayAssert.dox2
-rw-r--r--doc/Doxyfile.in8
-rw-r--r--doc/I00_CustomizingEigen.dox2
-rw-r--r--eigen3.pc.in (renamed from eigen2.pc.in)3
-rwxr-xr-xscripts/eigen_gen_credits4
-rw-r--r--test/testsuite.cmake8
-rw-r--r--unsupported/README.txt2
-rw-r--r--unsupported/doc/Doxyfile.in8
12 files changed, 104 insertions, 41 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a23479d7..62d292c02 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,14 +7,14 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
endif()
# automatically parse the version number
-file(READ "${CMAKE_SOURCE_DIR}/Eigen/src/Core/util/Macros.h" _eigen2_version_header)
-string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen2_world_version_match "${_eigen2_version_header}")
-set(EIGEN2_WORLD_VERSION "${CMAKE_MATCH_1}")
-string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen2_major_version_match "${_eigen2_version_header}")
-set(EIGEN2_MAJOR_VERSION "${CMAKE_MATCH_1}")
-string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen2_minor_version_match "${_eigen2_version_header}")
-set(EIGEN2_MINOR_VERSION "${CMAKE_MATCH_1}")
-set(EIGEN_VERSION_NUMBER ${EIGEN2_WORLD_VERSION}.${EIGEN2_MAJOR_VERSION}.${EIGEN2_MINOR_VERSION})
+file(READ "${CMAKE_SOURCE_DIR}/Eigen/src/Core/util/Macros.h" _eigen_version_header)
+string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen_world_version_match "${_eigen_version_header}")
+set(EIGEN_WORLD_VERSION "${CMAKE_MATCH_1}")
+string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen_major_version_match "${_eigen_version_header}")
+set(EIGEN_MAJOR_VERSION "${CMAKE_MATCH_1}")
+string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen_minor_version_match "${_eigen_version_header}")
+set(EIGEN_MINOR_VERSION "${CMAKE_MATCH_1}")
+set(EIGEN_VERSION_NUMBER ${EIGEN_WORLD_VERSION}.${EIGEN_MAJOR_VERSION}.${EIGEN_MINOR_VERSION})
# if the mercurial program is absent, this will leave the EIGEN_HG_CHANGESET string empty,
# but won't stop CMake.
@@ -117,14 +117,14 @@ option(EIGEN_TEST_RVALUE_REF_SUPPORT "Enable rvalue references for unit tests."
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
set(INCLUDE_INSTALL_DIR
- "${CMAKE_INSTALL_PREFIX}/include/eigen2"
+ "${CMAKE_INSTALL_PREFIX}/include/eigen3"
CACHE PATH
"The directory where we install the header files"
)
if(EIGEN_BUILD_PKGCONFIG)
- configure_file(eigen2.pc.in eigen2.pc)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eigen2.pc
+ configure_file(eigen3.pc.in eigen3.pc)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eigen3.pc
DESTINATION share/pkgconfig
)
endif(EIGEN_BUILD_PKGCONFIG)
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h
index a94300de3..a51b46f02 100644
--- a/Eigen/src/Core/util/Macros.h
+++ b/Eigen/src/Core/util/Macros.h
@@ -29,8 +29,8 @@
#undef minor
#define EIGEN_WORLD_VERSION 2
-#define EIGEN_MAJOR_VERSION 90
-#define EIGEN_MINOR_VERSION 1
+#define EIGEN_MAJOR_VERSION 91
+#define EIGEN_MINOR_VERSION 0
#define EIGEN_VERSION_AT_LEAST(x,y,z) (EIGEN_WORLD_VERSION>x || (EIGEN_WORLD_VERSION>=x && \
(EIGEN_MAJOR_VERSION>y || (EIGEN_MAJOR_VERSION>=y && \
diff --git a/cmake/FindEigen3.cmake b/cmake/FindEigen3.cmake
new file mode 100644
index 000000000..610df8023
--- /dev/null
+++ b/cmake/FindEigen3.cmake
@@ -0,0 +1,80 @@
+# - Try to find Eigen3 lib
+#
+# This module supports requiring a minimum version, e.g. you can do
+# find_package(Eigen3 3.1.2)
+# to require version 3.1.2 or newer of Eigen3.
+#
+# Once done this will define
+#
+# EIGEN3_FOUND - system has eigen lib with correct version
+# EIGEN3_INCLUDE_DIR - the eigen include directory
+# EIGEN3_VERSION - eigen version
+
+# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
+# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
+# Redistribution and use is allowed according to the terms of the BSD license.
+
+if(NOT Eigen3_FIND_VERSION)
+ if(NOT Eigen3_FIND_VERSION_MAJOR)
+ set(Eigen3_FIND_VERSION_MAJOR 2)
+ endif(NOT Eigen3_FIND_VERSION_MAJOR)
+ if(NOT Eigen3_FIND_VERSION_MINOR)
+ set(Eigen3_FIND_VERSION_MINOR 91)
+ endif(NOT Eigen3_FIND_VERSION_MINOR)
+ if(NOT Eigen3_FIND_VERSION_PATCH)
+ set(Eigen3_FIND_VERSION_PATCH 0)
+ endif(NOT Eigen3_FIND_VERSION_PATCH)
+
+ set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
+endif(NOT Eigen3_FIND_VERSION)
+
+macro(_eigen3_check_version)
+ file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header LIMIT 5000 OFFSET 1000)
+
+ string(REGEX MATCH "define *EIGEN_WORLD_VERSION ([0-9]*)" _eigen3_world_version_match "${_eigen3_version_header}")
+ set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
+ string(REGEX MATCH "define *EIGEN_MAJOR_VERSION ([0-9]*)" _eigen3_major_version_match "${_eigen3_version_header}")
+ set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
+ string(REGEX MATCH "define *EIGEN_MINOR_VERSION ([0-9]*)" _eigen3_minor_version_match "${_eigen3_version_header}")
+ set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
+
+ set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
+ if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
+ set(EIGEN3_VERSION_OK FALSE)
+ else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
+ set(EIGEN3_VERSION_OK TRUE)
+ endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
+
+ if(NOT EIGEN3_VERSION_OK)
+
+ message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
+ "but at least version ${Eigen3_FIND_VERSION} is required")
+ endif(NOT EIGEN3_VERSION_OK)
+endmacro(_eigen3_check_version)
+
+if (EIGEN3_INCLUDE_DIR)
+
+ # in cache already
+ _eigen3_check_version()
+ set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
+
+else (EIGEN3_INCLUDE_DIR)
+
+ find_path(EIGEN3_INCLUDE_DIR NAMES Eigen/Core
+ PATHS
+ ${INCLUDE_INSTALL_DIR}
+ ${KDE4_INCLUDE_DIR}
+ PATH_SUFFIXES eigen3
+ )
+
+ if(EIGEN3_INCLUDE_DIR)
+ _eigen3_check_version()
+ endif(EIGEN3_INCLUDE_DIR)
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
+
+ mark_as_advanced(EIGEN3_INCLUDE_DIR)
+
+endif(EIGEN3_INCLUDE_DIR)
+
diff --git a/doc/C01_QuickStartGuide.dox b/doc/C01_QuickStartGuide.dox
index 06b2595e7..0c545f735 100644
--- a/doc/C01_QuickStartGuide.dox
+++ b/doc/C01_QuickStartGuide.dox
@@ -36,7 +36,7 @@ In order to use Eigen, you just need to download and extract Eigen's source code
Here are some quick compilation instructions with GCC. To quickly test an example program, just do
-\code g++ -I /path/to/eigen2/ my_program.cpp -o my_program \endcode
+\code g++ -I /path/to/eigen/ my_program.cpp -o my_program \endcode
There is no library to link to. For good performance, add the \c -O2 compile-flag. Note however that this makes it impossible to debug inside Eigen code, as many functions get inlined. In some cases, performance can be further improved by disabling Eigen assertions: use \c -DEIGEN_NO_DEBUG or \c -DNDEBUG to disable them.
diff --git a/doc/D11_UnalignedArrayAssert.dox b/doc/D11_UnalignedArrayAssert.dox
index 226b20452..f4da15236 100644
--- a/doc/D11_UnalignedArrayAssert.dox
+++ b/doc/D11_UnalignedArrayAssert.dox
@@ -4,7 +4,7 @@ namespace Eigen {
Hello! You are seeing this webpage because your program terminated on an assertion failure like this one:
<pre>
-my_program: path/to/eigen2/Eigen/src/Core/MatrixStorage.h:44:
+my_program: path/to/eigen/Eigen/src/Core/MatrixStorage.h:44:
Eigen::ei_matrix_array<T, Size, MatrixOptions, Align>::ei_matrix_array()
[with T = double, int Size = 2, int MatrixOptions = 2, bool Align = true]:
Assertion `(reinterpret_cast<size_t>(array) & 0xf) == 0 && "this assertion
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
index 82ebf6aa0..7f5b26a61 100644
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -1,11 +1,3 @@
-################################################################################
-## ##
-## WARNING ##
-## ##
-## all modifications in this file must be reported in eigen2/Mainpage.dox ##
-## ##
-################################################################################
-
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
#
diff --git a/doc/I00_CustomizingEigen.dox b/doc/I00_CustomizingEigen.dox
index 7c8ba9b75..ede6f23b7 100644
--- a/doc/I00_CustomizingEigen.dox
+++ b/doc/I00_CustomizingEigen.dox
@@ -2,7 +2,7 @@ namespace Eigen {
/** \page CustomizingEigen Advanced - Customizing/Extending Eigen
-Eigen2 can be extended in several ways, for instance, by defining global methods, \ref ExtendingMatrixBase "by adding custom methods to MatrixBase", adding support to \ref CustomScalarType "custom types" etc.
+Eigen can be extended in several ways, for instance, by defining global methods, \ref ExtendingMatrixBase "by adding custom methods to MatrixBase", adding support to \ref CustomScalarType "custom types" etc.
\b Table \b of \b contents
- \ref ExtendingMatrixBase
diff --git a/eigen2.pc.in b/eigen3.pc.in
index b508a58d3..c5855de33 100644
--- a/eigen2.pc.in
+++ b/eigen3.pc.in
@@ -1,5 +1,4 @@
-
-Name: Eigen2
+Name: Eigen3
Description: A C++ template library for linear algebra: vectors, matrices, and related algorithms
Requires:
Version: ${EIGEN_VERSION_NUMBER}
diff --git a/scripts/eigen_gen_credits b/scripts/eigen_gen_credits
index c67416784..83ca8da12 100755
--- a/scripts/eigen_gen_credits
+++ b/scripts/eigen_gen_credits
@@ -1,10 +1,10 @@
#!/bin/sh
-# this script must be run from the eigen2/ directory.
+# this script must be run from the eigen/ directory.
# when running hg churn from the scripts/ subdir, i hit a divide-by-zero error.
#
# like this:
-# cd eigen2
+# cd eigen
# USER=yourtuxfamilyuser scripts/eigen_gen_credits
rm -f eigen_gen_credits.log
diff --git a/test/testsuite.cmake b/test/testsuite.cmake
index 9c38e48b1..90edf2853 100644
--- a/test/testsuite.cmake
+++ b/test/testsuite.cmake
@@ -4,7 +4,7 @@
# Usage:
# - create a new folder, let's call it cdash
# - in that folder, do:
-# ctest -S path/to/eigen2/test/testsuite.cmake[,option1=value1[,option2=value2]]
+# ctest -S path/to/eigen/test/testsuite.cmake[,option1=value1[,option2=value2]]
#
# Options:
# - EIGEN_CXX: compiler, eg.: g++-4.2
@@ -44,9 +44,9 @@
# ARCH=`uname -m`
# SITE=`hostname`
# VERSION=opensuse-11.1
-# WORK_DIR=/home/gael/Coding/eigen2/cdash
+# WORK_DIR=/home/gael/Coding/eigen/cdash
# # get the last version of the script
-# wget http://bitbucket.org/eigen/eigen2/raw/tip/test/testsuite.cmake -o $WORK_DIR/testsuite.cmake
+# wget http://bitbucket.org/eigen/eigen/raw/tip/test/testsuite.cmake -o $WORK_DIR/testsuite.cmake
# COMMON="ctest -S $WORK_DIR/testsuite.cmake,EIGEN_WORK_DIR=$WORK_DIR,EIGEN_SITE=$SITE,EIGEN_MODE=$1,EIGEN_BUILD_STRING=$OS_VERSION-$ARCH"
# $COMMON-gcc-3.4.6,EIGEN_CXX=g++-3.4
# $COMMON-gcc-4.0.1,EIGEN_CXX=g++-4.0.1
@@ -141,7 +141,7 @@ endif(NOT EIGEN_MODE)
if(NOT EIGEN_NO_UPDATE)
SET (CTEST_CVS_COMMAND "hg")
- SET (CTEST_CVS_CHECKOUT "${CTEST_CVS_COMMAND} clone http://bitbucket.org/eigen/eigen2 \"${CTEST_SOURCE_DIRECTORY}\"")
+ SET (CTEST_CVS_CHECKOUT "${CTEST_CVS_COMMAND} clone http://bitbucket.org/eigen/eigen \"${CTEST_SOURCE_DIRECTORY}\"")
SET(CTEST_BACKUP_AND_RESTORE TRUE) # the backup is CVS related ...
endif(NOT EIGEN_NO_UPDATE)
diff --git a/unsupported/README.txt b/unsupported/README.txt
index ed1341426..83479ff0b 100644
--- a/unsupported/README.txt
+++ b/unsupported/README.txt
@@ -4,7 +4,7 @@ most of them are subject to be included in Eigen in the future.
In order to use an unsupported module you have to do either:
- - add the path_to_eigen2/unsupported directory to your include path and do:
+ - add the path_to_eigen/unsupported directory to your include path and do:
#include <Eigen/ModuleHeader>
- or directly do:
diff --git a/unsupported/doc/Doxyfile.in b/unsupported/doc/Doxyfile.in
index 269595820..a9c7d6004 100644
--- a/unsupported/doc/Doxyfile.in
+++ b/unsupported/doc/Doxyfile.in
@@ -1,11 +1,3 @@
-################################################################################
-## ##
-## WARNING ##
-## ##
-## all modifications in this file must be reported in eigen2/Mainpage.dox ##
-## ##
-################################################################################
-
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
#