From 20a96f6275ffde39c3c8f4ffcae9351616628ed1 Mon Sep 17 00:00:00 2001 From: Paulo Meira <10246101+PMeira@users.noreply.github.com> Date: Wed, 4 Feb 2026 01:51:00 -0300 Subject: [PATCH] Use Eigen 5.0.0, including C++14 build, general CI updates including ARM64 Linux. --- .github/workflows/builds.yml | 22 ++++++++++++++++------ CMakeLists.txt | 22 +++++++++++----------- README.md | 6 +++--- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index ef631d8..f7708eb 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -1,6 +1,6 @@ name: Builds -#TODO: Linux ARM64, Windows ARM64 +#TODO: Windows ARM64 on: # release: @@ -17,15 +17,22 @@ jobs: docker_image: 'pmeira/manylinux_wheel_fpc322_x86_64' extra_cmake_flags: '' klusolve_linux32: '' + gh_image: ubuntu-latest - arch: x86 docker_image: 'pmeira/manylinux_wheel_fpc322_i686' extra_cmake_flags: '-DCMAKE_CXX_COMPILER_ARG1=-m32 -DCMAKE_C_COMPILER_ARG1=-m32' klusolve_linux32: linux32 + gh_image: ubuntu-latest + - arch: arm64 + docker_image: 'pmeira/manylinux_wheel_fpc322_aarch64' + extra_cmake_flags: '' + klusolve_linux32: '' + gh_image: ubuntu-24.04-arm - runs-on: ubuntu-latest + runs-on: ${{ matrix.gh_image }} env: KLUSOLVE_OS: linux - EIGEN_VERSION : "3.4.0" + EIGEN_VERSION : "5.0.0" DOCKER_IMAGE: ${{ matrix.docker_image }} KLUSOLVE_ARCH: ${{ matrix.arch }} KLUSOLVE_EXTRA_CMAKE_FLAGS: ${{ matrix.extra_cmake_flags }} @@ -64,16 +71,19 @@ jobs: strategy: matrix: include: - - os: macos-13 + - os: macos-15-intel arch: x64 + extra_cmake_flags: '-DCMAKE_POLICY_VERSION_MINIMUM=3.5' - os: macos-latest arch: arm64 + extra_cmake_flags: '-DCMAKE_POLICY_VERSION_MINIMUM=3.5' runs-on: ${{ matrix.os }} env: KLUSOLVE_OS: darwin KLUSOLVE_ARCH: ${{ matrix.arch }} - EIGEN_VERSION : "3.4.0" + EIGEN_VERSION : "5.0.0" + KLUSOLVE_EXTRA_CMAKE_FLAGS: ${{ matrix.extra_cmake_flags }} steps: - uses: "actions/checkout@v4" with: @@ -121,7 +131,7 @@ jobs: KLUSOLVE_OS_IMAGE: ${{ matrix.os }} KLUSOLVE_ARCH: ${{ matrix.arch }} KLUSOLVE_COMPILER: ${{ matrix.compiler }} - EIGEN_VERSION: "3.4.0" + EIGEN_VERSION: "5.0.0" steps: - uses: "actions/checkout@v4" with: diff --git a/CMakeLists.txt b/CMakeLists.txt index cdbdd24..6c2c271 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ -# Copyright (C) 2012-2024 Paulo Meira -# Copyright (C) 2019-2024 DSS-Extensions contributors +# Copyright (C) 2012-2026 Paulo Meira +# Copyright (C) 2019-2026 DSS-Extensions contributors # This augmented KLUSolve CMakeLists.txt is based on a personal script to # build SuiteSparse on Windows. This will be updated to a simpler version # when newer SuiteSparse versions are adopted. @@ -14,7 +14,7 @@ endif() SET(USE_SYSTEM_SUITESPARSE ON CACHE BOOL "Use system SuiteSparse.") SET(DSS_EXTENSIONS OFF CACHE BOOL "If building for distribution on DSS-Extensions, enable this. It tweaks the output folders.") -SET(USE_SYSTEM_EIGEN ON CACHE BOOL "Use system Eigen3 (v3.4 recommended).") +SET(USE_SYSTEM_EIGEN ON CACHE BOOL "Use system Eigen3 (v5.0 recommended).") # Moved from KLUSOLVEX_LIB_TYPE to BUILD_SHARED_LIBS to simplify the build process when # integrating with other build tools @@ -35,7 +35,7 @@ endif () if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") SET(KLUSOLVEX_OUT_DIR_PREFIX "win") elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") - set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD 14) SET(KLUSOLVEX_OUT_DIR_PREFIX "darwin") elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") SET(KLUSOLVEX_OUT_DIR_PREFIX "linux") @@ -57,7 +57,7 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.4) - set (CMAKE_CXX_STANDARD 11) + set (CMAKE_CXX_STANDARD 14) endif() endif() @@ -86,14 +86,14 @@ else () STRING(REGEX REPLACE "\\\\" "/" EIGEN3_DIR ${EIGEN3_DIR}) endif() ELSE() - set(TARGET_EIGEN_VERSION "3.4.0") + set(TARGET_EIGEN_VERSION "5.0.0") IF (NOT EXISTS "${CMAKE_BINARY_DIR}/eigen-${TARGET_EIGEN_VERSION}/Eigen/Eigen") - message(STATUS "Downloading Eigen3 source code...") - file(DOWNLOAD "https://gitlab.com/libeigen/eigen/-/archive/${TARGET_EIGEN_VERSION}/eigen-${TARGET_EIGEN_VERSION}.tar.gz" "${CMAKE_BINARY_DIR}/eigen3.tar.gz") - message(STATUS "Unpacking Eigen3...") - execute_process(COMMAND ${CMAKE_COMMAND} -E tar zxf "eigen3.tar.gz" WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) + message(STATUS "Downloading Eigen source code...") + file(DOWNLOAD "https://gitlab.com/libeigen/eigen/-/archive/${TARGET_EIGEN_VERSION}/eigen-${TARGET_EIGEN_VERSION}.tar.gz" "${CMAKE_BINARY_DIR}/eigen.tar.gz") + message(STATUS "Unpacking Eigen...") + execute_process(COMMAND ${CMAKE_COMMAND} -E tar zxf "eigen.tar.gz" WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) ELSE() - message(STATUS "Eigen3 already exists, skipping download.") + message(STATUS "Eigen already exists, skipping download.") ENDIF() SET(EIGEN3_DIR "${CMAKE_BINARY_DIR}/eigen-${TARGET_EIGEN_VERSION}") ENDIF() diff --git a/README.md b/README.md index 209ad46..9df437f 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Changes include: 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. -**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. +**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. # Credits / Acknowledgment @@ -34,9 +34,9 @@ Since we don't include the code for KLU or SuiteSparse in this repository anymor KLUSolveX -Copyright (c) 2017-2024, Paulo Meira +Copyright (c) 2017-2026, Paulo Meira -Copyright (c) 2019-2024, DSS Extensions contributors +Copyright (c) 2019-2026, DSS-Extensions contributors Copyright (c) 2008, EnerNex Corporation