diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3dac75fa08..9cbb3b8001 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,21 +37,21 @@ jobs: generator: 'Visual Studio 17 2022' cc: '' cxx: '' - ignore_features: 'MPI' + ignore_features: 'MPI POWER_VISA' - name: 'Ubuntu-GCC' os: 'ubuntu-24.04' container: 'ghcr.io/unistuttgart-visus/megamol_ci_ubuntu:master' generator: 'Ninja' cc: 'gcc-13' cxx: 'g++-13' - ignore_features: 'CUESDK VR_INTEROP' + ignore_features: 'CUESDK POWER_VISA VR_INTEROP' - name: 'Ubuntu-Clang' os: 'ubuntu-24.04' container: 'ghcr.io/unistuttgart-visus/megamol_ci_ubuntu:master' generator: 'Ninja' cc: 'clang-18' cxx: 'clang++-18' - ignore_features: 'CUESDK VR_INTEROP' + ignore_features: 'CUESDK POWER_VISA VR_INTEROP' name: "Vcpkg-${{ matrix.job.name }}" runs-on: ${{ matrix.job.os }} container: @@ -114,7 +114,7 @@ jobs: CXX: ${{ matrix.job.cxx }} VCPKG_BINARY_SOURCES: "clear;http,https://vcpkg-cache.megamol.org/{triplet}-{name}-{sha},readwrite,Authorization: Token ${{ secrets.CACHING_SERVER_SECRET }}" build_windows: - if: ${{ always() }} + if: ${{ !cancelled() }} needs: vcpkg_cache strategy: fail-fast: false @@ -146,7 +146,7 @@ jobs: - name: Build run: cmake --build $GITHUB_WORKSPACE/build --config ${{ matrix.job.configuration }} --parallel 2 build_linux: - if: ${{ always() }} + if: ${{ !cancelled() }} needs: vcpkg_cache strategy: fail-fast: false diff --git a/CMakeLists.txt b/CMakeLists.txt index 751adc5dbe..f55fb68e36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,7 @@ megamol_feature_option(VTKM "Enable VTK-m support." OFF) # MegaMol vcpkg features (dependent options) megamol_feature_option(CUESDK "Enable Corsair CUESDK support." OFF "WIN32") megamol_feature_option(OPENGL_DEBUGGROUPS "Inject OpenGL debug groups into calls." OFF "MEGAMOL_USE_OPENGL") +megamol_feature_option(POWER_VISA "Enable power measurement VISA sensors." OFF "MEGAMOL_USE_POWER") megamol_feature_option(TRACY_TIME_PLOT "Enable custom Tracy timed plotting capabilities." OFF "MEGAMOL_USE_TRACY") megamol_feature_option(VR_INTEROP "Enable MegaMol-Unity VR Interop via Spout2." OFF "WIN32;MEGAMOL_USE_OPENGL") diff --git a/cmake/vcpkg_ports/power-overwhelming/devendor-fetchcontent-deps.patch b/cmake/vcpkg_ports/power-overwhelming/devendor-fetchcontent-deps.patch index ca2f3b003b..d69b9832d3 100644 --- a/cmake/vcpkg_ports/power-overwhelming/devendor-fetchcontent-deps.patch +++ b/cmake/vcpkg_ports/power-overwhelming/devendor-fetchcontent-deps.patch @@ -1,18 +1,15 @@ diff --git a/power_overwhelming/CMakeLists.txt b/power_overwhelming/CMakeLists.txt -index 3fc7fb7..33daec6 100644 +index b81db75..564c8a6 100644 --- a/power_overwhelming/CMakeLists.txt +++ b/power_overwhelming/CMakeLists.txt -@@ -74,8 +74,9 @@ if (WIN32) +@@ -73,6 +73,7 @@ if (WIN32) target_compile_options(${PROJECT_NAME} PRIVATE "-doc") endif () +find_package(nlohmann_json CONFIG REQUIRED) target_link_libraries(${PROJECT_NAME} -- PRIVATE adl nlohmann_json nvml tinkerforge) -+ PRIVATE adl nlohmann_json::nlohmann_json nvml tinkerforge) + PRIVATE adl nlohmann_json::nlohmann_json nvml tinkerforge) - if (WIN32) - target_link_libraries(${PROJECT_NAME} PUBLIC Ws2_32) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index acbe4cf..5981e04 100644 --- a/third_party/CMakeLists.txt diff --git a/cmake/vcpkg_ports/power-overwhelming/portfile.cmake b/cmake/vcpkg_ports/power-overwhelming/portfile.cmake index 84fd2f3066..17fbd79795 100644 --- a/cmake/vcpkg_ports/power-overwhelming/portfile.cmake +++ b/cmake/vcpkg_ports/power-overwhelming/portfile.cmake @@ -3,9 +3,8 @@ vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO UniStuttgart-VISUS/power-overwhelming - #REF "v${VERSION}" - REF "7143f0b11777de934046ef7bd02c1cbf82fa39b9" # master on 2024-07-01 - SHA512 cc32febef11edeb98d2192e67bba302ef4f3086f4e23572a28bb19a20ce0bf2123680bf28839433cfb98ffc541663ed8e19fd162c2a6e5fdfad6802cb1cea563 + REF "f84cec4e67bf8aa3974d069cf86019507535f595" # master on 2024-08-25 + SHA512 0251e5baef1c7331f18880e3d9598285d8c40f64b4f98ce4b370c0bb09416336af1d664145c40dc05c3d2692ac55b1a166b518d374c027b374052dba8de2a3bc HEAD_REF master PATCHES devendor-fetchcontent-deps.patch @@ -24,6 +23,11 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + visa PWROWG_WithVisa +) + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS @@ -31,6 +35,7 @@ vcpkg_cmake_configure( -DPWROWG_BuildTests=OFF -DPWROWG_CustomTinkerforgeFirmwareMajor=99 -Dadl_SOURCE_DIR=${ADL_SOURCE_PATH} + ${FEATURE_OPTIONS} ) vcpkg_cmake_install() diff --git a/cmake/vcpkg_ports/power-overwhelming/vcpkg.json b/cmake/vcpkg_ports/power-overwhelming/vcpkg.json index 8ab071c895..e2957ba4ae 100644 --- a/cmake/vcpkg_ports/power-overwhelming/vcpkg.json +++ b/cmake/vcpkg_ports/power-overwhelming/vcpkg.json @@ -1,6 +1,6 @@ { "name": "power-overwhelming", - "version-date": "2024-07-01", + "version-date": "2024-08-25", "description": "Measurement framekwork for GPU power consumption.", "homepage": "https://github.com/UniStuttgart-VISUS/power-overwhelming", "license": "MIT", @@ -14,5 +14,10 @@ "name": "vcpkg-cmake-config", "host": true } - ] + ], + "features": { + "visa": { + "description": "Enable visa sensors" + } + } } diff --git a/vcpkg.json b/vcpkg.json index 9c0dd6ff84..a5e5d7bce5 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -161,6 +161,17 @@ "power-overwhelming" ] }, + "power-visa": { + "description": "Use power measurement visa sensors", + "dependencies": [ + { + "name": "power-overwhelming", + "features": [ + "visa" + ] + } + ] + }, "profiling": { "description": "Use Profiling" },