From eae3876313494ed8f54c1e4f91c25fadb367bf0c Mon Sep 17 00:00:00 2001 From: Antony Peacock Date: Sat, 15 Feb 2025 17:59:25 +0000 Subject: [PATCH 01/10] Add required tooling to venv and use multi-config builds --- CMakePresets.json | 155 +++++++++++++++++++++------------------------- requirements.txt | 6 +- 2 files changed, 73 insertions(+), 88 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 89ba9f232..fbe3882ba 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -9,8 +9,9 @@ { "name": "ninja", "hidden": true, - "generator": "Ninja", + "generator": "Ninja Multi-Config", "cacheVariables": { + "CMAKE_MAKE_PROGRAM": "${sourceDir}/.venv/bin/ninja", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" } }, @@ -18,10 +19,12 @@ "name": "default", "binaryDir": "${sourceDir}/build/${presetName}", "cacheVariables": { - "CMAKE_INSTALL_PREFIX": "${sourceDir}/install/${presetName}" + "CMAKE_INSTALL_PREFIX": "${sourceDir}/install/${presetName}", + "CMAKE_INTERPROCEDURAL_OPTIMIZATION" : "ON", + "CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG" : "OFF" }, "inherits": [ - "ninja" + "ninja" ], "hidden": true }, @@ -59,10 +62,10 @@ "hidden": true }, { - "name": "gcc12", + "name": "clang18", "cacheVariables": { - "CMAKE_C_COMPILER": "gcc-12", - "CMAKE_CXX_COMPILER": "g++-12" + "CMAKE_C_COMPILER": "clang-18", + "CMAKE_CXX_COMPILER": "clang++-18" }, "inherits": [ "default" @@ -70,10 +73,10 @@ "hidden": true }, { - "name": "gcc13", + "name": "clang19", "cacheVariables": { - "CMAKE_C_COMPILER": "gcc-13", - "CMAKE_CXX_COMPILER": "g++-13" + "CMAKE_C_COMPILER": "clang-19", + "CMAKE_CXX_COMPILER": "clang++-19" }, "inherits": [ "default" @@ -81,15 +84,10 @@ "hidden": true }, { - "name": "mscv", - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - }, + "name": "gcc12", "cacheVariables": { - "CMAKE_C_COMPILER": "cl", - "CMAKE_CXX_COMPILER": "cl" + "CMAKE_C_COMPILER": "gcc-12", + "CMAKE_CXX_COMPILER": "g++-12" }, "inherits": [ "default" @@ -97,96 +95,81 @@ "hidden": true }, { - "name": "debug", + "name": "gcc13", "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug" + "CMAKE_C_COMPILER": "gcc-13", + "CMAKE_CXX_COMPILER": "g++-13" }, + "inherits": [ + "default" + ], "hidden": true }, { - "name": "release", + "name": "gcc14", "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", - "CMAKE_INTERPROCEDURAL_OPTIMIZATION": true + "CMAKE_C_COMPILER": "gcc-14", + "CMAKE_CXX_COMPILER": "g++-14" }, + "inherits": [ + "default" + ], "hidden": true }, { - "name": "rwdi", + "name": "mscv", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + }, "cacheVariables": { - "CMAKE_BUILD_TYPE": "RelWithDebInfo", - "CMAKE_INTERPROCEDURAL_OPTIMIZATION": true + "CMAKE_C_COMPILER": "cl", + "CMAKE_CXX_COMPILER": "cl" }, + "inherits": [ + "default" + ], "hidden": true }, { - "name": "msr", + "name": "apple-clang", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Darwin" + }, "cacheVariables": { - "CMAKE_BUILD_TYPE": "MinSizeRel", - "CMAKE_INTERPROCEDURAL_OPTIMIZATION": true + "CMAKE_C_COMPILER": "clang", + "CMAKE_CXX_COMPILER": "clang++" }, + "inherits": [ + "default" + ], "hidden": true }, - { "name": "msvc-x64-debug", "displayName": "MSVC x64 Debug", "description": "mscv for x64 (Debug)", "inherits": [ "mscv", "debug" ] }, - { "name": "msvc-x64-release", "displayName": "MSVC x64 Release", "description": "mscv for x64 (Release)", "inherits": [ "mscv", "release" ] }, - { "name": "msvc-x64-rwdi", "displayName": "MSVC x64 RelWithDebInfo", "description": "mscv for x64 (RelWithDebInfo)", "inherits": [ "mscv", "rwdi" ] }, - { "name": "msvc-x64-msr", "displayName": "MSVC x64 MinSizeRel", "description": "mscv for x64 (MinSizeRel)", "inherits": [ "mscv", "msr" ] }, - - { "name": "gcc12-x64-debug", "displayName": "gcc-12 x64 Debug", "description": "gcc12 for x64 (Debug)", "inherits": [ "gcc12", "debug" ] }, - { "name": "gcc12-x64-release", "displayName": "gcc-12 x64 Release", "description": "gcc12 for x64 (Release)", "inherits": [ "gcc12", "release" ] }, - { "name": "gcc12-x64-rwdi", "displayName": "gcc-12 x64 RelWithDebInfo", "description": "gcc12 for x64 (RelWithDebInfo)", "inherits": [ "gcc12", "rwdi" ] }, - { "name": "gcc12-x64-msr", "displayName": "gcc-12 x64 MinSizeRel", "description": "gcc12 for x64 (MinSizeRel)", "inherits": [ "gcc12", "msr" ] }, - - { "name": "gcc13-x64-debug", "displayName": "gcc-13 x64 Debug", "description": "gcc13 for x64 (Debug)", "inherits": [ "gcc13", "debug" ] }, - { "name": "gcc13-x64-release", "displayName": "gcc-13 x64 Release", "description": "gcc13 for x64 (Release)", "inherits": [ "gcc13", "release" ] }, - { "name": "gcc13-x64-rwdi", "displayName": "gcc-13 x64 RelWithDebInfo", "description": "gcc13 for x64 (RelWithDebInfo)", "inherits": [ "gcc13", "rwdi" ] }, - { "name": "gcc13-x64-msr", "displayName": "gcc-13 x64 MinSizeRel", "description": "gcc13 for x64 (MinSizeRel)", "inherits": [ "gcc13", "msr" ] }, - - { "name": "clang15-x64-debug", "displayName": "clang-15 x64 Debug", "description": "clang15 for x64 (Debug)", "inherits": [ "clang15", "debug" ] }, - { "name": "clang15-x64-release", "displayName": "clang-15 x64 Release", "description": "clang15 for x64 (Release)", "inherits": [ "clang15", "release" ] }, - { "name": "clang15-x64-rwdi", "displayName": "clang-15 x64 RelWithDebInfo", "description": "clang15 for x64 (RelWithDebInfo)", "inherits": [ "clang15", "rwdi" ] }, - { "name": "clang15-x64-msr", "displayName": "clang-15 x64 MinSizeRel", "description": "clang15 for x64 (MinSizeRel)", "inherits": [ "clang15", "msr" ] }, - - { "name": "clang16-x64-debug", "displayName": "clang-16 x64 Debug", "description": "clang16 for x64 (Debug)", "inherits": [ "clang16", "debug" ] }, - { "name": "clang16-x64-release", "displayName": "clang-16 x64 Release", "description": "clang16 for x64 (Release)", "inherits": [ "clang16", "release" ] }, - { "name": "clang16-x64-rwdi", "displayName": "clang-16 x64 RelWithDebInfo", "description": "clang16 for x64 (RelWithDebInfo)", "inherits": [ "clang16", "rwdi" ] }, - { "name": "clang16-x64-msr", "displayName": "clang-16 x64 MinSizeRel", "description": "clang16 for x64 (MinSizeRel)", "inherits": [ "clang16", "msr" ] }, - - { "name": "clang17-x64-debug", "displayName": "clang-17 x64 Debug", "description": "clang17 for x64 (Debug)", "inherits": [ "clang17", "debug" ] }, - { "name": "clang17-x64-release", "displayName": "clang-17 x64 Release", "description": "clang17 for x64 (Release)", "inherits": [ "clang17", "release" ] }, - { "name": "clang17-x64-rwdi", "displayName": "clang-17 x64 RelWithDebInfo", "description": "clang17 for x64 (RelWithDebInfo)", "inherits": [ "clang17", "rwdi" ] }, - { "name": "clang17-x64-msr", "displayName": "clang-17 x64 MinSizeRel", "description": "clang17 for x64 (MinSizeRel)", "inherits": [ "clang17", "msr" ] } + { "name": "apple-clang-x64", "displayName": "apple-clang x64", "description": "apple-clang for x64", "inherits": [ "apple-clang" ] }, + { "name": "clang15-x64", "displayName": "clang-15 x64", "description": "clang15 for x64", "inherits": [ "clang15" ] }, + { "name": "clang16-x64", "displayName": "clang-16 x64", "description": "clang16 for x64", "inherits": [ "clang16" ] }, + { "name": "clang17-x64", "displayName": "clang-17 x64", "description": "clang17 for x64", "inherits": [ "clang17" ] }, + { "name": "clang18-x64", "displayName": "clang-18 x64", "description": "clang18 for x64", "inherits": [ "clang18" ] }, + { "name": "clang19-x64", "displayName": "clang-19 x64", "description": "clang19 for x64", "inherits": [ "clang19" ] }, + { "name": "gcc12-x64", "displayName": "gcc-12 x64", "description": "gcc12 for x64", "inherits": [ "gcc12" ] }, + { "name": "gcc13-x64", "displayName": "gcc-13 x64", "description": "gcc13 for x64", "inherits": [ "gcc13" ] }, + { "name": "gcc14-x64", "displayName": "gcc-14 x64", "description": "gcc14 for x64", "inherits": [ "gcc14" ] }, + { "name": "msvc-x64", "displayName": "MSVC x64", "description": "mscv for x64", "inherits": [ "mscv" ] } ], "buildPresets": [ - { "name": "msvc-x64-debug", "displayName": "MSVC x64 Debug", "configurePreset": "msvc-x64-debug" }, - { "name": "msvc-x64-release", "displayName": "MSVC x64 Release", "configurePreset": "msvc-x64-release" }, - { "name": "msvc-x64-rwdi", "displayName": "MSVC x64 RelWithDebInfo", "configurePreset": "msvc-x64-rwdi" }, - { "name": "msvc-x64-msr", "displayName": "MSVC x64 MinSizeRel", "configurePreset": "msvc-x64-msr" }, - - { "name": "gcc12-x64-debug", "displayName": "gcc-12 x64 Debug", "configurePreset": "gcc12-x64-debug" }, - { "name": "gcc12-x64-release", "displayName": "gcc-12 x64 Release", "configurePreset": "gcc12-x64-release" }, - { "name": "gcc12-x64-rwdi", "displayName": "gcc-12 x64 RelWithDebInfo", "configurePreset": "gcc12-x64-rwdi" }, - { "name": "gcc12-x64-msr", "displayName": "gcc-12 x64 MinSizeRel", "configurePreset": "gcc12-x64-msr" }, - - { "name": "gcc13-x64-debug", "displayName": "gcc-13 x64 Debug", "configurePreset": "gcc13-x64-debug" }, - { "name": "gcc13-x64-release", "displayName": "gcc-13 x64 Release", "configurePreset": "gcc13-x64-release" }, - { "name": "gcc13-x64-rwdi", "displayName": "gcc-13 x64 RelWithDebInfo", "configurePreset": "gcc13-x64-rwdi" }, - { "name": "gcc13-x64-msr", "displayName": "gcc-13 x64 MinSizeRel", "configurePreset": "gcc13-x64-msr" }, - - { "name": "clang15-x64-debug", "displayName": "clang-15 x64 Debug", "configurePreset": "clang15-x64-debug" }, - { "name": "clang15-x64-release", "displayName": "clang-15 x64 Release", "configurePreset": "clang15-x64-release" }, - { "name": "clang15-x64-rwdi", "displayName": "clang-15 x64 RelWithDebInfo", "configurePreset": "clang15-x64-rwdi" }, - { "name": "clang15-x64-msr", "displayName": "clang-15 x64 MinSizeRel", "configurePreset": "clang15-x64-msr" }, - - { "name": "clang16-x64-debug", "displayName": "clang-16 x64 Debug", "configurePreset": "clang16-x64-debug" }, - { "name": "clang16-x64-release", "displayName": "clang-16 x64 Release", "configurePreset": "clang16-x64-release" }, - { "name": "clang16-x64-rwdi", "displayName": "clang-16 x64 RelWithDebInfo", "configurePreset": "clang16-x64-rwdi" }, - { "name": "clang16-x64-msr", "displayName": "clang-16 x64 MinSizeRel", "configurePreset": "clang16-x64-msr" }, - - { "name": "clang17-x64-debug", "displayName": "clang-17 x64 Debug", "configurePreset": "clang17-x64-debug" }, - { "name": "clang17-x64-release", "displayName": "clang-17 x64 Release", "configurePreset": "clang17-x64-release" }, - { "name": "clang17-x64-rwdi", "displayName": "clang-17 x64 RelWithDebInfo", "configurePreset": "clang17-x64-rwdi" }, - { "name": "clang17-x64-msr", "displayName": "clang-17 x64 MinSizeRel", "configurePreset": "clang17-x64-msr" } + { "name": "apple-clang-x64", "displayName": "apple-clang-15 x64", "configurePreset": "apple-clang-x64" }, + { "name": "clang15-x64", "displayName": "clang-15 x64", "configurePreset": "clang15-x64" }, + { "name": "clang16-x64", "displayName": "clang-16 x64", "configurePreset": "clang16-x64" }, + { "name": "clang17-x64", "displayName": "clang-17 x64", "configurePreset": "clang17-x64" }, + { "name": "clang18-x64", "displayName": "clang-18 x64", "configurePreset": "clang18-x64" }, + { "name": "clang19-x64", "displayName": "clang-19 x64", "configurePreset": "clang19-x64" }, + { "name": "gcc12-x64", "displayName": "gcc-12 x64", "configurePreset": "gcc12-x64" }, + { "name": "gcc13-x64", "displayName": "gcc-13 x64", "configurePreset": "gcc13-x64" }, + { "name": "gcc14-x64", "displayName": "gcc-14 x64", "configurePreset": "gcc14-x64" }, + { "name": "msvc-x64", "displayName": "MSVC x64", "configurePreset": "msvc-x64" } ] } diff --git a/requirements.txt b/requirements.txt index d54e1cd49..7c4516c98 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ +cmake==3.31.4 conan>=2.1.0 -ninja -pre-commit +ninja==1.11.1.1 +pre-commit==3.7.0 +pip==25.0.1 \ No newline at end of file From 33bc5d8401cd04612f2e7fdc538d5ee065e7a6d5 Mon Sep 17 00:00:00 2001 From: Antony Peacock Date: Sat, 15 Feb 2025 18:31:43 +0000 Subject: [PATCH 02/10] Update CI Python --- .github/workflows/cmake.yml | 5 +++-- .github/workflows/code_coverage.yml | 6 +++--- .github/workflows/documentation.yml | 4 ++-- .github/workflows/pre-commit.yml | 4 +++- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 3e0ef0ef4..7a1c5ed1b 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -229,9 +229,9 @@ jobs: xcode-version: '${{matrix.settings.compiler.version}}' - name: Set up Python - uses: actions/setup-python@v5.3.0 + uses: actions/setup-python@v5.4.0 with: - python-version: '3.11' + python-version: '3.13' - name: Install Python requirements run: | @@ -241,6 +241,7 @@ jobs: shell: bash run: | conan profile detect --force + sed -i.backup '/^\[settings\]$/,/^\[/ s/^build_type=.*/build_type=${{ matrix.configuration }}/' .conan2/profiles/default sed -i.backup '/^\[settings\]$/,/^\[/ s/^compiler.cppstd=.*/compiler.cppstd=${{ matrix.settings.compiler.std }}/' .conan2/profiles/default if [[ "${{ matrix.settings.compiler.type }}" == "GCC" || "${{ matrix.settings.compiler.type }}" == "CLANG" ]]; then diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index f5f6fbbb6..8a7b8ff09 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -27,7 +27,7 @@ env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Debug COMPILER_TYPE: gcc - COMPILER_VERSION: 12 + COMPILER_VERSION: 14 STDLIB: libstdc++11 @@ -96,9 +96,9 @@ jobs: sudo apt-get install libdatetime-perl - name: Set up Python - uses: actions/setup-python@v5.3.0 + uses: actions/setup-python@v5.4.0 with: - python-version: '3.11' + python-version: '3.13' - name: Install Python requirements run: | diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 7c7fbdf97..926ea0698 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -64,9 +64,9 @@ jobs: platform: x64 - name: Set up Python - uses: actions/setup-python@v5.3.0 + uses: actions/setup-python@v5.4.0 with: - python-version: '3.11' + python-version: '3.13' - name: Install Python requirements run: | diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index c2f7e71fc..2cc058f7e 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,5 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v5.4.0 + with: + python-version: '3.13' - uses: pre-commit/action@v3.0.0 From a06fcceb3d18cd5a242340c97a7cd6a98d603071 Mon Sep 17 00:00:00 2001 From: Antony Peacock Date: Sat, 15 Feb 2025 18:32:41 +0000 Subject: [PATCH 03/10] Run pre-commit --- CMakePresets.json | 44 ++++++++++++++++++++++---------------------- requirements.txt | 3 ++- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index fbe3882ba..ad325299f 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -11,7 +11,7 @@ "hidden": true, "generator": "Ninja Multi-Config", "cacheVariables": { - "CMAKE_MAKE_PROGRAM": "${sourceDir}/.venv/bin/ninja", + "CMAKE_MAKE_PROGRAM": "${sourceDir}/.venv/bin/ninja", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" } }, @@ -24,7 +24,7 @@ "CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG" : "OFF" }, "inherits": [ - "ninja" + "ninja" ], "hidden": true }, @@ -149,27 +149,27 @@ "hidden": true }, - { "name": "apple-clang-x64", "displayName": "apple-clang x64", "description": "apple-clang for x64", "inherits": [ "apple-clang" ] }, - { "name": "clang15-x64", "displayName": "clang-15 x64", "description": "clang15 for x64", "inherits": [ "clang15" ] }, - { "name": "clang16-x64", "displayName": "clang-16 x64", "description": "clang16 for x64", "inherits": [ "clang16" ] }, - { "name": "clang17-x64", "displayName": "clang-17 x64", "description": "clang17 for x64", "inherits": [ "clang17" ] }, - { "name": "clang18-x64", "displayName": "clang-18 x64", "description": "clang18 for x64", "inherits": [ "clang18" ] }, - { "name": "clang19-x64", "displayName": "clang-19 x64", "description": "clang19 for x64", "inherits": [ "clang19" ] }, - { "name": "gcc12-x64", "displayName": "gcc-12 x64", "description": "gcc12 for x64", "inherits": [ "gcc12" ] }, - { "name": "gcc13-x64", "displayName": "gcc-13 x64", "description": "gcc13 for x64", "inherits": [ "gcc13" ] }, - { "name": "gcc14-x64", "displayName": "gcc-14 x64", "description": "gcc14 for x64", "inherits": [ "gcc14" ] }, - { "name": "msvc-x64", "displayName": "MSVC x64", "description": "mscv for x64", "inherits": [ "mscv" ] } + { "name": "apple-clang", "displayName": "apple-clang", "description": "apple-clang", "inherits": [ "apple-clang" ] }, + { "name": "clang15", "displayName": "clang-15", "description": "clang15", "inherits": [ "clang15" ] }, + { "name": "clang16", "displayName": "clang-16", "description": "clang16", "inherits": [ "clang16" ] }, + { "name": "clang17", "displayName": "clang-17", "description": "clang17", "inherits": [ "clang17" ] }, + { "name": "clang18", "displayName": "clang-18", "description": "clang18", "inherits": [ "clang18" ] }, + { "name": "clang19", "displayName": "clang-19", "description": "clang19", "inherits": [ "clang19" ] }, + { "name": "gcc12", "displayName": "gcc-12", "description": "gcc12", "inherits": [ "gcc12" ] }, + { "name": "gcc13", "displayName": "gcc-13", "description": "gcc13", "inherits": [ "gcc13" ] }, + { "name": "gcc14", "displayName": "gcc-14", "description": "gcc14", "inherits": [ "gcc14" ] }, + { "name": "msvc", "displayName": "MSVC", "description": "mscv", "inherits": [ "mscv" ] } ], "buildPresets": [ - { "name": "apple-clang-x64", "displayName": "apple-clang-15 x64", "configurePreset": "apple-clang-x64" }, - { "name": "clang15-x64", "displayName": "clang-15 x64", "configurePreset": "clang15-x64" }, - { "name": "clang16-x64", "displayName": "clang-16 x64", "configurePreset": "clang16-x64" }, - { "name": "clang17-x64", "displayName": "clang-17 x64", "configurePreset": "clang17-x64" }, - { "name": "clang18-x64", "displayName": "clang-18 x64", "configurePreset": "clang18-x64" }, - { "name": "clang19-x64", "displayName": "clang-19 x64", "configurePreset": "clang19-x64" }, - { "name": "gcc12-x64", "displayName": "gcc-12 x64", "configurePreset": "gcc12-x64" }, - { "name": "gcc13-x64", "displayName": "gcc-13 x64", "configurePreset": "gcc13-x64" }, - { "name": "gcc14-x64", "displayName": "gcc-14 x64", "configurePreset": "gcc14-x64" }, - { "name": "msvc-x64", "displayName": "MSVC x64", "configurePreset": "msvc-x64" } + { "name": "apple-clang", "displayName": "apple-clang", "configurePreset": "apple-clang" }, + { "name": "clang15", "displayName": "clang-15", "configurePreset": "clang15" }, + { "name": "clang16", "displayName": "clang-16", "configurePreset": "clang16" }, + { "name": "clang17", "displayName": "clang-17", "configurePreset": "clang17" }, + { "name": "clang18", "displayName": "clang-18", "configurePreset": "clang18" }, + { "name": "clang19", "displayName": "clang-19", "configurePreset": "clang19" }, + { "name": "gcc12", "displayName": "gcc-12", "configurePreset": "gcc12" }, + { "name": "gcc13", "displayName": "gcc-13", "configurePreset": "gcc13" }, + { "name": "gcc14", "displayName": "gcc-14", "configurePreset": "gcc14" }, + { "name": "msvc", "displayName": "MSVC", "configurePreset": "msvc" } ] } diff --git a/requirements.txt b/requirements.txt index 7c4516c98..1aeb857d2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ +clang-format==19.1.7 cmake==3.31.4 conan>=2.1.0 ninja==1.11.1.1 +pip==25.0.1 pre-commit==3.7.0 -pip==25.0.1 \ No newline at end of file From 4c013ff312837c39c0872f3dbd2ba3b76c478bd1 Mon Sep 17 00:00:00 2001 From: Antony Peacock Date: Sat, 15 Feb 2025 18:47:25 +0000 Subject: [PATCH 04/10] Simplify presets --- CMakePresets.json | 45 ++++++++++++--------------------------------- 1 file changed, 12 insertions(+), 33 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index ad325299f..8f3086c86 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -36,8 +36,7 @@ }, "inherits": [ "default" - ], - "hidden": true + ] }, { "name": "clang16", @@ -47,8 +46,7 @@ }, "inherits": [ "default" - ], - "hidden": true + ] }, { "name": "clang17", @@ -58,8 +56,7 @@ }, "inherits": [ "default" - ], - "hidden": true + ] }, { "name": "clang18", @@ -69,8 +66,7 @@ }, "inherits": [ "default" - ], - "hidden": true + ] }, { "name": "clang19", @@ -80,8 +76,7 @@ }, "inherits": [ "default" - ], - "hidden": true + ] }, { "name": "gcc12", @@ -91,8 +86,7 @@ }, "inherits": [ "default" - ], - "hidden": true + ] }, { "name": "gcc13", @@ -102,8 +96,7 @@ }, "inherits": [ "default" - ], - "hidden": true + ] }, { "name": "gcc14", @@ -113,11 +106,10 @@ }, "inherits": [ "default" - ], - "hidden": true + ] }, { - "name": "mscv", + "name": "msvc", "condition": { "type": "equals", "lhs": "${hostSystemName}", @@ -129,8 +121,7 @@ }, "inherits": [ "default" - ], - "hidden": true + ] }, { "name": "apple-clang", @@ -145,20 +136,8 @@ }, "inherits": [ "default" - ], - "hidden": true - }, - - { "name": "apple-clang", "displayName": "apple-clang", "description": "apple-clang", "inherits": [ "apple-clang" ] }, - { "name": "clang15", "displayName": "clang-15", "description": "clang15", "inherits": [ "clang15" ] }, - { "name": "clang16", "displayName": "clang-16", "description": "clang16", "inherits": [ "clang16" ] }, - { "name": "clang17", "displayName": "clang-17", "description": "clang17", "inherits": [ "clang17" ] }, - { "name": "clang18", "displayName": "clang-18", "description": "clang18", "inherits": [ "clang18" ] }, - { "name": "clang19", "displayName": "clang-19", "description": "clang19", "inherits": [ "clang19" ] }, - { "name": "gcc12", "displayName": "gcc-12", "description": "gcc12", "inherits": [ "gcc12" ] }, - { "name": "gcc13", "displayName": "gcc-13", "description": "gcc13", "inherits": [ "gcc13" ] }, - { "name": "gcc14", "displayName": "gcc-14", "description": "gcc14", "inherits": [ "gcc14" ] }, - { "name": "msvc", "displayName": "MSVC", "description": "mscv", "inherits": [ "mscv" ] } + ] + } ], "buildPresets": [ { "name": "apple-clang", "displayName": "apple-clang", "configurePreset": "apple-clang" }, From 3d4779b7bbaa503ba0f16f66e400471b657719bd Mon Sep 17 00:00:00 2001 From: Antony Peacock Date: Sun, 16 Feb 2025 11:19:50 +0000 Subject: [PATCH 05/10] Update documentation packages --- .../documentation_requirements.txt | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cmake/requirements/documentation_requirements.txt b/cmake/requirements/documentation_requirements.txt index 7644cdf76..0e68b08d8 100644 --- a/cmake/requirements/documentation_requirements.txt +++ b/cmake/requirements/documentation_requirements.txt @@ -1,12 +1,12 @@ -breathe==4.34.0 -exhale==0.3.6 -myst-parser==0.18.1 -Sphinx==4.5.0 -sphinx-rtd-theme==1.1.1 -sphinxcontrib-applehelp==1.0.4 -sphinxcontrib-devhelp==1.0.2 -sphinxcontrib-htmlhelp==2.0.1 +breathe==4.35.0 +exhale==0.3.7 +myst-parser==4.0.1 +Sphinx==8.1.3 +sphinx-rtd-theme==3.0.2 +sphinxcontrib-applehelp==2.0.0 +sphinxcontrib-devhelp==2.0.0 +sphinxcontrib-htmlhelp==2.1.0 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-moderncmakedomain==3.27.0 +sphinxcontrib-moderncmakedomain==3.29.0 sphinxcontrib-qthelp==1.0.3 -sphinxcontrib-serializinghtml==1.1.5 +sphinxcontrib-serializinghtml==2.0.0 From f4d3d6adf5259d369f5e3f15b6aa5c2a1e05686a Mon Sep 17 00:00:00 2001 From: Antony Peacock Date: Sun, 16 Feb 2025 11:22:59 +0000 Subject: [PATCH 06/10] One more package updated --- cmake/requirements/documentation_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/requirements/documentation_requirements.txt b/cmake/requirements/documentation_requirements.txt index 0e68b08d8..f6f53b530 100644 --- a/cmake/requirements/documentation_requirements.txt +++ b/cmake/requirements/documentation_requirements.txt @@ -8,5 +8,5 @@ sphinxcontrib-devhelp==2.0.0 sphinxcontrib-htmlhelp==2.1.0 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-moderncmakedomain==3.29.0 -sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-qthelp==2.0.0 sphinxcontrib-serializinghtml==2.0.0 From beb185167f30b2377b0674177f6f7bbbb212bc42 Mon Sep 17 00:00:00 2001 From: Antony Peacock Date: Sun, 16 Feb 2025 14:30:37 +0000 Subject: [PATCH 07/10] Use a simple compile time conditional --- .../serialisation/concepts/reader_archetype.hpp | 2 +- .../containers/concepts/archetypes/unordered.hpp | 16 +++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/libraries/core/src/morpheus/core/serialisation/concepts/reader_archetype.hpp b/libraries/core/src/morpheus/core/serialisation/concepts/reader_archetype.hpp index 2b5f5d538..c19422645 100644 --- a/libraries/core/src/morpheus/core/serialisation/concepts/reader_archetype.hpp +++ b/libraries/core/src/morpheus/core/serialisation/concepts/reader_archetype.hpp @@ -48,7 +48,7 @@ struct ReaderArchetype /// Read any arithmetic type from the serialisation. template requires std::is_arithmetic_v - T read(); + consteval T read(); /// Read a string from the serialisation. template requires std::is_same_v diff --git a/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp b/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp index 7d1cf1e8d..7ca4c2755 100644 --- a/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp +++ b/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp @@ -63,17 +63,11 @@ struct Unordered : public AllocatorAware, detail::Multi, detail::Mapped>; - using InsertNodeHandleReturnType = std::invoke_result_t::insert_return_type; }; }) - { - return typename detail::Multi::insert_return_type{}; - } - else - { - return typename AllocatorAware::iterator{}; - } - })>; + using InsertNodeHandleReturnType = std::conditional_t< + requires { typename detail::Multi::insert_return_type; }, + typename detail::Multi::insert_return_type, + typename AllocatorAware::iterator + >; using BoundReturnType = std::conditional_t>; using BoundConstReturnType = std::conditional_t>; From 690a4c498a31f5c3a45d316393a2d3ec6e094e98 Mon Sep 17 00:00:00 2001 From: Antony Peacock Date: Sun, 16 Feb 2025 16:56:15 +0000 Subject: [PATCH 08/10] Use type based deduction of insert return types --- .../concepts/archetypes/unordered.hpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp b/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp index 7ca4c2755..226870343 100644 --- a/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp +++ b/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp @@ -63,11 +63,19 @@ struct Unordered : public AllocatorAware, detail::Multi, detail::Mapped>; - using InsertNodeHandleReturnType = std::conditional_t< - requires { typename detail::Multi::insert_return_type; }, - typename detail::Multi::insert_return_type, - typename AllocatorAware::iterator - >; + + template + struct GetInsertReturnType { + using type = typename AllocatorAware::iterator; // Default if not available + }; + + template + struct GetInsertReturnType> { + using type = typename T::insert_return_type; // Use if available + }; + + // Alias to extract type easily + using InsertNodeHandleReturnType = typename GetInsertReturnType>::type; using BoundReturnType = std::conditional_t>; using BoundConstReturnType = std::conditional_t>; From 850ad323bf360e309f0018235d204fef222a9986 Mon Sep 17 00:00:00 2001 From: Antony Peacock Date: Sun, 16 Feb 2025 16:58:24 +0000 Subject: [PATCH 09/10] Run pre-commit --- .../morpheus/containers/concepts/archetypes/unordered.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp b/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp index 226870343..77e47c999 100644 --- a/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp +++ b/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp @@ -68,12 +68,12 @@ struct Unordered : public AllocatorAware, detail::Multi, detail::Mapped struct GetInsertReturnType> { using type = typename T::insert_return_type; // Use if available }; - + // Alias to extract type easily using InsertNodeHandleReturnType = typename GetInsertReturnType>::type; From 82e479c7e89225c85f0759ee15ffb3e28f0dc50c Mon Sep 17 00:00:00 2001 From: Antony Peacock Date: Sun, 16 Feb 2025 17:01:57 +0000 Subject: [PATCH 10/10] And update associative too --- .../concepts/archetypes/associative.hpp | 26 +++++++++++-------- .../concepts/archetypes/unordered.hpp | 1 + 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/libraries/core/testing/morpheus/containers/concepts/archetypes/associative.hpp b/libraries/core/testing/morpheus/containers/concepts/archetypes/associative.hpp index cec8ff8ac..ae0f90108 100644 --- a/libraries/core/testing/morpheus/containers/concepts/archetypes/associative.hpp +++ b/libraries/core/testing/morpheus/containers/concepts/archetypes/associative.hpp @@ -7,6 +7,7 @@ #include #include #include +#include namespace morpheus::containers::concepts::archetypes { @@ -62,17 +63,20 @@ struct Associative : AllocatorAware, detail::Multi, detail::Mapped>; - using InsertNodeHandleReturnType = std::invoke_result_t::insert_return_type; }; }) - { - return typename detail::Multi::insert_return_type{}; - } - else - { - return typename AllocatorAware::iterator{}; - } - })>; + + template + struct GetInsertReturnType { + using type = typename AllocatorAware::iterator; // Default if not available + }; + + template + struct GetInsertReturnType> { + using type = typename T::insert_return_type; // Use if available + }; + + // Alias to extract type easily + using InsertNodeHandleReturnType = typename GetInsertReturnType>::type; + using BoundReturnType = std::conditional_t>; using BoundConstReturnType = std::conditional_t>; diff --git a/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp b/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp index 77e47c999..643c872d5 100644 --- a/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp +++ b/libraries/core/testing/morpheus/containers/concepts/archetypes/unordered.hpp @@ -6,6 +6,7 @@ #include #include +#include namespace morpheus::containers::concepts::archetypes {