diff --git a/.github/workflows/module-ci.yml b/.github/workflows/module-ci.yml new file mode 100644 index 0000000..ae258eb --- /dev/null +++ b/.github/workflows/module-ci.yml @@ -0,0 +1,24 @@ +name: Module CI + +on: + workflow_dispatch: + inputs: + opendaq-ref: + description: "openDAQ SDK commit, branch or tag" + required: false + default: "" + pull_request: + +jobs: + call-opendaq-modules-ci: + name: Call module CI + uses: openDAQ/actions/.github/workflows/reusable-module-ci.yml@jira/TBBAS-3013-resusable-workflow-ci-module + with: + opendaq-ref: ${{ github.event.inputs.opendaq-ref || '' }} + packages: > + [ + { + "runners": ["ubuntu-*"], + "packages": {"apt": ["libpcap-dev"]} + } + ] diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c8efcf..0e2b4ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,10 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) opendaq_common_compile_targets_settings() opendaq_setup_compiler_flags(${REPO_OPTION_PREFIX}) +if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10) + add_compile_options(-Wno-unknown-warning-option) +endif() + if (${REPO_OPTION_PREFIX}_ENABLE_TESTS) message(STATUS "Unit tests in ${REPO_NAME} are ENABLED") set(OPENDAQ_ENABLE_TEST_UTILS ON CACHE BOOL "Enable testing utils library") diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..6df8dd7 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,20 @@ +{ + "version": 4, + "configurePresets": [ + { + "name": "module", + "cacheVariables": { + "ASAM_CMP_ENABLE_EXAMPLE": false + } + } + ], + "testPresets": [ + { + "name": "module-test", + "configurePreset": "module", + "output": { + "outputOnFailure": true + } + } + ] +} diff --git a/modules/asam_cmp_capture_module/tests/CMakeLists.txt b/modules/asam_cmp_capture_module/tests/CMakeLists.txt index b4a620a..e0ab703 100644 --- a/modules/asam_cmp_capture_module/tests/CMakeLists.txt +++ b/modules/asam_cmp_capture_module/tests/CMakeLists.txt @@ -33,6 +33,11 @@ target_link_libraries(${TEST_APP} PRIVATE ${OPENDAQ_SDK_TARGET_NAMESPACE}::opend asam_cmp_capture_module_lib ) +if (MSVC) + target_link_options(${TEST_APP} PRIVATE /DELAYLOAD:wpcap.dll /DELAYLOAD:packet.dll) + target_link_libraries(${TEST_APP} PRIVATE delayimp) +endif() + add_test(NAME ${TEST_APP} COMMAND $ ) diff --git a/modules/asam_cmp_data_sink/tests/CMakeLists.txt b/modules/asam_cmp_data_sink/tests/CMakeLists.txt index 37fc1fd..20d8c1a 100644 --- a/modules/asam_cmp_data_sink/tests/CMakeLists.txt +++ b/modules/asam_cmp_data_sink/tests/CMakeLists.txt @@ -24,6 +24,12 @@ target_link_libraries(${TEST_APP} PRIVATE ${OPENDAQ_SDK_TARGET_NAMESPACE}::opend asam_cmp_data_sink_lib ) +if (MSVC) + target_link_options(${TEST_APP} PRIVATE /DELAYLOAD:wpcap.dll /DELAYLOAD:packet.dll) + target_link_libraries(${TEST_APP} PRIVATE delayimp) +endif() + + add_test(NAME ${TEST_APP} COMMAND $ )