Skip to content

Commit 20a96f6

Browse files
committed
Use Eigen 5.0.0, including C++14 build, general CI updates including ARM64 Linux.
1 parent 892b12b commit 20a96f6

3 files changed

Lines changed: 30 additions & 20 deletions

File tree

.github/workflows/builds.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Builds
22

3-
#TODO: Linux ARM64, Windows ARM64
3+
#TODO: Windows ARM64
44

55
on:
66
# release:
@@ -17,15 +17,22 @@ jobs:
1717
docker_image: 'pmeira/manylinux_wheel_fpc322_x86_64'
1818
extra_cmake_flags: ''
1919
klusolve_linux32: ''
20+
gh_image: ubuntu-latest
2021
- arch: x86
2122
docker_image: 'pmeira/manylinux_wheel_fpc322_i686'
2223
extra_cmake_flags: '-DCMAKE_CXX_COMPILER_ARG1=-m32 -DCMAKE_C_COMPILER_ARG1=-m32'
2324
klusolve_linux32: linux32
25+
gh_image: ubuntu-latest
26+
- arch: arm64
27+
docker_image: 'pmeira/manylinux_wheel_fpc322_aarch64'
28+
extra_cmake_flags: ''
29+
klusolve_linux32: ''
30+
gh_image: ubuntu-24.04-arm
2431

25-
runs-on: ubuntu-latest
32+
runs-on: ${{ matrix.gh_image }}
2633
env:
2734
KLUSOLVE_OS: linux
28-
EIGEN_VERSION : "3.4.0"
35+
EIGEN_VERSION : "5.0.0"
2936
DOCKER_IMAGE: ${{ matrix.docker_image }}
3037
KLUSOLVE_ARCH: ${{ matrix.arch }}
3138
KLUSOLVE_EXTRA_CMAKE_FLAGS: ${{ matrix.extra_cmake_flags }}
@@ -64,16 +71,19 @@ jobs:
6471
strategy:
6572
matrix:
6673
include:
67-
- os: macos-13
74+
- os: macos-15-intel
6875
arch: x64
76+
extra_cmake_flags: '-DCMAKE_POLICY_VERSION_MINIMUM=3.5'
6977
- os: macos-latest
7078
arch: arm64
79+
extra_cmake_flags: '-DCMAKE_POLICY_VERSION_MINIMUM=3.5'
7180

7281
runs-on: ${{ matrix.os }}
7382
env:
7483
KLUSOLVE_OS: darwin
7584
KLUSOLVE_ARCH: ${{ matrix.arch }}
76-
EIGEN_VERSION : "3.4.0"
85+
EIGEN_VERSION : "5.0.0"
86+
KLUSOLVE_EXTRA_CMAKE_FLAGS: ${{ matrix.extra_cmake_flags }}
7787
steps:
7888
- uses: "actions/checkout@v4"
7989
with:
@@ -121,7 +131,7 @@ jobs:
121131
KLUSOLVE_OS_IMAGE: ${{ matrix.os }}
122132
KLUSOLVE_ARCH: ${{ matrix.arch }}
123133
KLUSOLVE_COMPILER: ${{ matrix.compiler }}
124-
EIGEN_VERSION: "3.4.0"
134+
EIGEN_VERSION: "5.0.0"
125135
steps:
126136
- uses: "actions/checkout@v4"
127137
with:

CMakeLists.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Copyright (C) 2012-2024 Paulo Meira
2-
# Copyright (C) 2019-2024 DSS-Extensions contributors
1+
# Copyright (C) 2012-2026 Paulo Meira
2+
# Copyright (C) 2019-2026 DSS-Extensions contributors
33
# This augmented KLUSolve CMakeLists.txt is based on a personal script to
44
# build SuiteSparse on Windows. This will be updated to a simpler version
55
# when newer SuiteSparse versions are adopted.
@@ -14,7 +14,7 @@ endif()
1414

1515
SET(USE_SYSTEM_SUITESPARSE ON CACHE BOOL "Use system SuiteSparse.")
1616
SET(DSS_EXTENSIONS OFF CACHE BOOL "If building for distribution on DSS-Extensions, enable this. It tweaks the output folders.")
17-
SET(USE_SYSTEM_EIGEN ON CACHE BOOL "Use system Eigen3 (v3.4 recommended).")
17+
SET(USE_SYSTEM_EIGEN ON CACHE BOOL "Use system Eigen3 (v5.0 recommended).")
1818

1919
# Moved from KLUSOLVEX_LIB_TYPE to BUILD_SHARED_LIBS to simplify the build process when
2020
# integrating with other build tools
@@ -35,7 +35,7 @@ endif ()
3535
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
3636
SET(KLUSOLVEX_OUT_DIR_PREFIX "win")
3737
elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
38-
set(CMAKE_CXX_STANDARD 11)
38+
set(CMAKE_CXX_STANDARD 14)
3939
SET(KLUSOLVEX_OUT_DIR_PREFIX "darwin")
4040
elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
4141
SET(KLUSOLVEX_OUT_DIR_PREFIX "linux")
@@ -57,7 +57,7 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
5757

5858
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
5959
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.4)
60-
set (CMAKE_CXX_STANDARD 11)
60+
set (CMAKE_CXX_STANDARD 14)
6161
endif()
6262
endif()
6363

@@ -86,14 +86,14 @@ else ()
8686
STRING(REGEX REPLACE "\\\\" "/" EIGEN3_DIR ${EIGEN3_DIR})
8787
endif()
8888
ELSE()
89-
set(TARGET_EIGEN_VERSION "3.4.0")
89+
set(TARGET_EIGEN_VERSION "5.0.0")
9090
IF (NOT EXISTS "${CMAKE_BINARY_DIR}/eigen-${TARGET_EIGEN_VERSION}/Eigen/Eigen")
91-
message(STATUS "Downloading Eigen3 source code...")
92-
file(DOWNLOAD "https://gitlab.com/libeigen/eigen/-/archive/${TARGET_EIGEN_VERSION}/eigen-${TARGET_EIGEN_VERSION}.tar.gz" "${CMAKE_BINARY_DIR}/eigen3.tar.gz")
93-
message(STATUS "Unpacking Eigen3...")
94-
execute_process(COMMAND ${CMAKE_COMMAND} -E tar zxf "eigen3.tar.gz" WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
91+
message(STATUS "Downloading Eigen source code...")
92+
file(DOWNLOAD "https://gitlab.com/libeigen/eigen/-/archive/${TARGET_EIGEN_VERSION}/eigen-${TARGET_EIGEN_VERSION}.tar.gz" "${CMAKE_BINARY_DIR}/eigen.tar.gz")
93+
message(STATUS "Unpacking Eigen...")
94+
execute_process(COMMAND ${CMAKE_COMMAND} -E tar zxf "eigen.tar.gz" WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
9595
ELSE()
96-
message(STATUS "Eigen3 already exists, skipping download.")
96+
message(STATUS "Eigen already exists, skipping download.")
9797
ENDIF()
9898
SET(EIGEN3_DIR "${CMAKE_BINARY_DIR}/eigen-${TARGET_EIGEN_VERSION}")
9999
ENDIF()

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Changes include:
1818

1919
For binary distributions, basic descriptions of the dependencies and licensing information is reproduced below. When building from source, be sure to check the licenses of the components.
2020

21-
**Currently tested with Eigen 3.4.0 and SuiteSparse 5.6.0.** KLU, which is distributed in SuiteSparse, is very stable, so this library should be forward compatible. We will eventually integrate with the current SuiteSparse (CMake) build setup, but for now our build scripts provide a more streamlined setup when building from source.
21+
**Currently tested with Eigen 5.0.0 and SuiteSparse 5.6.0.** KLU, which is distributed in SuiteSparse, is very stable, so this library should be forward compatible. We will eventually integrate with the current SuiteSparse (CMake) build setup, but for now our build scripts provide a more streamlined setup when building from source.
2222

2323
# Credits / Acknowledgment
2424

@@ -34,9 +34,9 @@ Since we don't include the code for KLU or SuiteSparse in this repository anymor
3434

3535
KLUSolveX
3636

37-
Copyright (c) 2017-2024, Paulo Meira
37+
Copyright (c) 2017-2026, Paulo Meira
3838

39-
Copyright (c) 2019-2024, DSS Extensions contributors
39+
Copyright (c) 2019-2026, DSS-Extensions contributors
4040

4141
Copyright (c) 2008, EnerNex Corporation
4242

0 commit comments

Comments
 (0)