From 20b52c45565633a27df90d4bdc79c85f06836bf3 Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 1 Sep 2025 16:03:26 -0600 Subject: [PATCH 1/9] git submodule add https://github.com/externpro/externpro .devcontainer --- .devcontainer | 1 + .gitmodules | 3 +++ 2 files changed, 4 insertions(+) create mode 160000 .devcontainer create mode 100644 .gitmodules diff --git a/.devcontainer b/.devcontainer new file mode 160000 index 000000000..db96684f1 --- /dev/null +++ b/.devcontainer @@ -0,0 +1 @@ +Subproject commit db96684f141ae42465c0653fdbb00b77179fec9e diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..18932abfb --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule ".devcontainer"] + path = .devcontainer + url = https://github.com/externpro/externpro From 97016a2a2427d13aa2507d75a5652faebfe3b805 Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 1 Sep 2025 16:04:06 -0600 Subject: [PATCH 2/9] docker-compose links --- docker-compose.sh | 1 + docker-compose.yml | 1 + 2 files changed, 2 insertions(+) create mode 120000 docker-compose.sh create mode 120000 docker-compose.yml diff --git a/docker-compose.sh b/docker-compose.sh new file mode 120000 index 000000000..85f182f0b --- /dev/null +++ b/docker-compose.sh @@ -0,0 +1 @@ +.devcontainer/compose.pro.sh \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 120000 index 000000000..46c1f8918 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1 @@ +.devcontainer/compose.bld.yml \ No newline at end of file From 99f74fbacd9eae2b1625a439e87227b5eb5057e6 Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 1 Sep 2025 16:04:36 -0600 Subject: [PATCH 3/9] cp .devcontainer/cmake/presets/CMakePresets* . --- CMakePresets.json | 8 ++++++++ CMakePresetsBase.json | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 CMakePresets.json create mode 100644 CMakePresetsBase.json diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 000000000..f82cfdd2c --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,8 @@ +{ + "version": 8, + "include": [ + ".devcontainer/cmake/presets/xpLinuxNinja.json", + ".devcontainer/cmake/presets/xpDarwinNinja.json", + ".devcontainer/cmake/presets/xpWindowsVs2022.json" + ] +} diff --git a/CMakePresetsBase.json b/CMakePresetsBase.json new file mode 100644 index 000000000..09653d8ae --- /dev/null +++ b/CMakePresetsBase.json @@ -0,0 +1,10 @@ +{ + "version": 8, + "configurePresets": [ + { + "name": "config-base", + "hidden": true, + "binaryDir": "${sourceDir}/_bld-${presetName}" + } + ] +} From 33faea52d2b2c360106eedf3e4129dfe917f25b1 Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 1 Sep 2025 16:11:28 -0600 Subject: [PATCH 4/9] .gitignore: add externpro ignores, remove '*build*' * '*build*' ignores .github/workflows/xpbuild.yml --- .gitignore | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f6ab76fda..692337eed 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ core core.* *.bak *~ -*build* *.moc.* *.moc ui_* @@ -36,3 +35,8 @@ lapack/reference .settings Makefile !ci/build.gitlab-ci.yml + +# externpro +.env +_bld*/ +docker-compose.override.yml From 8008961e6072423747e5bfc3968d3a821f7f2451 Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 1 Sep 2025 16:12:34 -0600 Subject: [PATCH 5/9] cp .devcontainer/.github/wf-templates/xp*.yml .github/workflows externpro .github/workflows @25.05.1 --- .github/workflows/xpbuild.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/xprelease.yml | 20 ++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .github/workflows/xpbuild.yml create mode 100644 .github/workflows/xprelease.yml diff --git a/.github/workflows/xpbuild.yml b/.github/workflows/xpbuild.yml new file mode 100644 index 000000000..151d481d2 --- /dev/null +++ b/.github/workflows/xpbuild.yml @@ -0,0 +1,30 @@ +name: Build +on: + push: + branches: [ "dev" ] + pull_request: + branches: [ "dev" ] + workflow_dispatch: +jobs: + linux: + uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.1 + with: + cmake-workflow-preset: Linux + runon: ubuntu-latest + secrets: inherit + linux-arm64: + uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.1 + with: + cmake-workflow-preset: Linux + runon: ubuntu-24.04-arm + secrets: inherit + macos: + uses: externpro/externpro/.github/workflows/build-macos.yml@25.05.1 + with: + cmake-workflow-preset: Darwin + secrets: inherit + windows: + uses: externpro/externpro/.github/workflows/build-windows.yml@25.05.1 + with: + cmake-workflow-preset: Windows + secrets: inherit diff --git a/.github/workflows/xprelease.yml b/.github/workflows/xprelease.yml new file mode 100644 index 000000000..f868a82e5 --- /dev/null +++ b/.github/workflows/xprelease.yml @@ -0,0 +1,20 @@ +name: Release +on: + workflow_dispatch: + inputs: + workflow_run_url: + description: 'URL of the workflow run containing artifacts to upload (e.g., https://github.com/owner/repo/actions/runs/123456789)' + required: true + type: string +jobs: + # Upload build artifacts as release assets + release-from-build: + uses: externpro/externpro/.github/workflows/release-from-build.yml@25.05.1 + with: + workflow_run_url: ${{ github.event.inputs.workflow_run_url }} + artifact_pattern: "*.tar.xz" + permissions: + contents: write + id-token: write + attestations: write + secrets: inherit From 2fa17649879fa82534ec7e26239bccf6f13706ce Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 1 Sep 2025 19:09:24 -0600 Subject: [PATCH 6/9] externpro 25.05.1-30-g838863d --- .devcontainer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer b/.devcontainer index db96684f1..838863d32 160000 --- a/.devcontainer +++ b/.devcontainer @@ -1 +1 @@ -Subproject commit db96684f141ae42465c0653fdbb00b77179fec9e +Subproject commit 838863d323367b3931ee5af5d82aaa3bbd4f3d3b From 91eb5788eb42b1b18c05a6cefd578a4e88053cb8 Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 1 Sep 2025 19:10:48 -0600 Subject: [PATCH 7/9] .github/workflows/xpbuild: cmake-workflow-preset Release (header-only lib) --- .github/workflows/xpbuild.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/xpbuild.yml b/.github/workflows/xpbuild.yml index 151d481d2..fb5575822 100644 --- a/.github/workflows/xpbuild.yml +++ b/.github/workflows/xpbuild.yml @@ -9,22 +9,22 @@ jobs: linux: uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.1 with: - cmake-workflow-preset: Linux + cmake-workflow-preset: LinuxRelease runon: ubuntu-latest secrets: inherit linux-arm64: uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.1 with: - cmake-workflow-preset: Linux + cmake-workflow-preset: LinuxRelease runon: ubuntu-24.04-arm secrets: inherit macos: uses: externpro/externpro/.github/workflows/build-macos.yml@25.05.1 with: - cmake-workflow-preset: Darwin + cmake-workflow-preset: DarwinRelease secrets: inherit windows: uses: externpro/externpro/.github/workflows/build-windows.yml@25.05.1 with: - cmake-workflow-preset: Windows + cmake-workflow-preset: WindowsRelease secrets: inherit From 507c58001d16866bb32c4157c9719243562df328 Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 1 Sep 2025 19:17:48 -0600 Subject: [PATCH 8/9] CMakePresetsBase: set cacheVariables --- CMakePresetsBase.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakePresetsBase.json b/CMakePresetsBase.json index 09653d8ae..f8c228240 100644 --- a/CMakePresetsBase.json +++ b/CMakePresetsBase.json @@ -4,7 +4,12 @@ { "name": "config-base", "hidden": true, - "binaryDir": "${sourceDir}/_bld-${presetName}" + "binaryDir": "${sourceDir}/_bld-${presetName}", + "cacheVariables": { + "BUILD_TESTING": "OFF", + "EIGEN_BUILD_PKGCONFIG": "OFF", + "XP_NAMESPACE": "xpro" + } } ] } From b89c420f3e1eda7f1bfc5002ee0e65803dc69a8c Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Mon, 1 Sep 2025 19:19:49 -0600 Subject: [PATCH 9/9] externpro devel package --- CMakeLists.txt | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f3e69b845..08a2d11f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ # cmake_minimum_require must be the first command of the file -cmake_minimum_required(VERSION 3.5.0) +cmake_minimum_required(VERSION 3.5.0...3.31) +set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES .devcontainer/cmake/xproinc.cmake) project(Eigen3) # guard against in-source builds @@ -58,8 +59,9 @@ endif() include(CheckCXXCompilerFlag) include(GNUInstallDirs) include(CMakeDependentOption) +include(xpflags) -set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) +list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) option(EIGEN_TEST_CXX11 "Enable testing with C++11 and C++11 features (e.g. Tensor module)." OFF) @@ -420,6 +422,24 @@ set(EIGEN_CUDA_COMPUTE_ARCH 30 CACHE STRING "The CUDA compute architecture level include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +function(callPackageDevel) + set(XP_INSTALL_CMAKEDIR ${CMAKEPACKAGE_INSTALL_DIR}) + set(CMAKE_PROJECT_NAME eigen) + xpPackageDevel(TARGETS_FILE ${targetsFile} LIBRARIES ${INSTALL_NAMESPACE}Eigen) +endfunction() + +set(targetsFile Eigen3Targets) +if(DEFINED XP_NAMESPACE) + set(CMAKEPACKAGE_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/cmake") + set(INSTALL_COMPONENT "devel") + set(INSTALL_NAMESPACE "${XP_NAMESPACE}::") + callPackageDevel() + set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME devel) +else() + set(INSTALL_COMPONENT "Devel") + set(INSTALL_NAMESPACE "Eigen3::") +endif() + # Backward compatibility support for EIGEN_INCLUDE_INSTALL_DIR if(EIGEN_INCLUDE_INSTALL_DIR) message(WARNING "EIGEN_INCLUDE_INSTALL_DIR is deprecated. Use INCLUDE_INSTALL_DIR instead.") @@ -463,7 +483,7 @@ endmacro() install(FILES signature_of_eigen3_matrix_library - DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel + DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT ${INSTALL_COMPONENT} ) if(EIGEN_BUILD_PKGCONFIG) @@ -473,7 +493,7 @@ if(EIGEN_BUILD_PKGCONFIG) ) endif() -install(DIRECTORY Eigen DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) +install(DIRECTORY Eigen DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT ${INSTALL_COMPONENT}) option(EIGEN_BUILD_DOC "Enable creation of Eigen documentation" ON) @@ -605,12 +625,13 @@ target_compile_definitions (eigen INTERFACE ${EIGEN_DEFINITIONS}) target_include_directories (eigen INTERFACE $ $ + $ ) # Export as title case Eigen set_target_properties (eigen PROPERTIES EXPORT_NAME Eigen) -install (TARGETS eigen EXPORT Eigen3Targets) +install (TARGETS eigen EXPORT ${targetsFile}) configure_package_config_file ( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Eigen3Config.cmake.in @@ -632,12 +653,12 @@ set (CMAKE_SIZEOF_VOID_P ${_Eigen3_CMAKE_SIZEOF_VOID_P}) # The Eigen target will be located in the Eigen3 namespace. Other CMake # targets can refer to it using Eigen3::Eigen. -export (TARGETS eigen NAMESPACE Eigen3:: FILE Eigen3Targets.cmake) +export (TARGETS eigen NAMESPACE ${INSTALL_NAMESPACE} FILE ${targetsFile}.cmake) # Export Eigen3 package to CMake registry such that it can be easily found by # CMake even if it has not been installed to a standard directory. export (PACKAGE Eigen3) -install (EXPORT Eigen3Targets NAMESPACE Eigen3:: DESTINATION ${CMAKEPACKAGE_INSTALL_DIR}) +install (EXPORT ${targetsFile} NAMESPACE ${INSTALL_NAMESPACE} DESTINATION ${CMAKEPACKAGE_INSTALL_DIR}) install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/UseEigen3.cmake ${CMAKE_CURRENT_BINARY_DIR}/Eigen3Config.cmake