Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add power-visa feature #1261

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,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:
Expand Down Expand Up @@ -113,7 +113,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
Expand Down Expand Up @@ -145,7 +145,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
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(VR_INTEROP "Enable MegaMol-Unity VR Interop via Spout2." OFF "WIN32;MEGAMOL_USE_OPENGL")

# Disable in source build
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 8 additions & 3 deletions cmake/vcpkg_ports/power-overwhelming/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,13 +23,19 @@ 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
-DPWROWG_BuildDumpSensors=OFF
-DPWROWG_BuildTests=OFF
-DPWROWG_CustomTinkerforgeFirmwareMajor=99
-Dadl_SOURCE_DIR=${ADL_SOURCE_PATH}
${FEATURE_OPTIONS}
)

vcpkg_cmake_install()
Expand Down
9 changes: 7 additions & 2 deletions cmake/vcpkg_ports/power-overwhelming/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -14,5 +14,10 @@
"name": "vcpkg-cmake-config",
"host": true
}
]
],
"features": {
"visa": {
"description": "Enable visa sensors"
}
}
}
11 changes: 11 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,17 @@
"power-overwhelming"
]
},
"power-visa": {
"description": "Use power measurement visa sensors",
"dependencies": [
{
"name": "power-overwhelming",
"features": [
"visa"
]
}
]
},
"profiling": {
"description": "Use Profiling"
},
Expand Down
Loading