[upstream_utils] Upgrade to Eigen 5.0.0 (#8240)

This commit is contained in:
Tyler Veness
2025-09-20 15:49:23 -07:00
committed by GitHub
parent ee0a8a1e56
commit a7e7f6912a
4 changed files with 21 additions and 8 deletions

View File

@@ -77,6 +77,7 @@ def eigen_inclusions(dp: Path, f: str):
"SparseLU",
"SparseQR",
"StdVector",
"Version",
"misc",
"plugins",
]
@@ -144,8 +145,7 @@ def copy_upstream_src(wpilib_root: Path):
def main():
name = "eigen"
url = "https://gitlab.com/libeigen/eigen.git"
# master on 2025-09-08
tag = "e0a59e5a66e6d16fa93ab4f5e48bf539205e837f"
tag = "5.0.0"
eigen = Lib(name, url, tag, copy_upstream_src)
eigen.main()

View File

@@ -11,6 +11,9 @@
#ifndef EIGEN_CORE_MODULE_H
#define EIGEN_CORE_MODULE_H
// Eigen version information.
#include "Version"
// first thing Eigen does: stop the compiler from reporting useless warnings.
#include "src/Core/util/DisableStupidWarnings.h"

View File

@@ -0,0 +1,14 @@
#ifndef EIGEN_VERSION_H
#define EIGEN_VERSION_H
// The "WORLD" version will forever remain "3" for the "Eigen3" library.
#define EIGEN_WORLD_VERSION 3
// As of Eigen3 5.0.0, we have moved to Semantic Versioning (semver.org).
#define EIGEN_MAJOR_VERSION 5
#define EIGEN_MINOR_VERSION 0
#define EIGEN_PATCH_VERSION 0
#define EIGEN_PRERELEASE_VERSION "dev"
#define EIGEN_BUILD_VERSION "master"
#define EIGEN_VERSION_STRING "5.0.0-dev+master"
#endif // EIGEN_VERSION_H

View File

@@ -17,13 +17,9 @@
// Eigen version and basic defaults
//------------------------------------------------------------------------------------------
#define EIGEN_WORLD_VERSION 3
#define EIGEN_MAJOR_VERSION 4
#define EIGEN_MINOR_VERSION 90
#define EIGEN_VERSION_AT_LEAST(x, y, z) \
(EIGEN_WORLD_VERSION > x || \
(EIGEN_WORLD_VERSION >= x && (EIGEN_MAJOR_VERSION > y || (EIGEN_MAJOR_VERSION >= y && EIGEN_MINOR_VERSION >= z))))
(EIGEN_MAJOR_VERSION > x || \
(EIGEN_MAJOR_VERSION >= x && (EIGEN_MINOR_VERSION > y || (EIGEN_MINOR_VERSION >= y && EIGEN_PATCH_VERSION >= z))))
#ifdef EIGEN_DEFAULT_TO_ROW_MAJOR
#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION Eigen::RowMajor