Skip to content

Commit 987f29b

Browse files
author
Aliaksandr Adziareika
committed
<TBBAS-2530> Set export example device module interface explicitly
1 parent 911963c commit 987f29b

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,18 @@ jobs:
6060
- name: Configure simple device module with CMake Windows
6161
if: runner.os == 'Windows'
6262
# run: cmake -B build/output -S . -G Ninja -DOPENDAQ_ENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ steps.windows-dependencies-install.outputs.vcpkg-toolchain-file }}
63-
run: cmake -B build/output -S . -G Ninja -DOPENDAQ_ENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release
63+
run: cmake -B build/output -S . -G "Visual Studio 17 2022" -DOPENDAQ_ENABLE_TESTS=ON -DOPENDAQ_MSVC_SINGLE_PROCESS_BUILD=ON -DDAQMODULES_PARQUET_RECORDER_MODULE=ON -DCMAKE_BUILD_TYPE=Release
64+
65+
- name: Build simple device module with CMake Windows
66+
if: runner.os == 'Windows'
67+
run: cmake --build build/output --config Release
6468

6569
- name: Configure simple device module with CMake
6670
if: runner.os != 'Windows'
67-
run: cmake -B build/output -S . -G Ninja -DOPENDAQ_ENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release
68-
71+
run: cmake -B build/output -S . -G Ninja -DOPENDAQ_ENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release
72+
6973
- name: Build simple device module with CMake
74+
if: runner.os != 'Windows'
7075
run: cmake --build build/output --target all
7176

7277
- name: Run simple device module tests via CTest with GTest report

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
cmake_minimum_required(VERSION 3.25)
22
set(REPO_NAME example_device_module)
33
set(REPO_OPTION_PREFIX EXAMPLE_MODULE)
4+
set(SDK_TARGET_NAMESPACE daq)
45

56
project(${REPO_NAME} VERSION 1.0.0)
67

example_module/src/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ add_library(${LIB_NAME} SHARED ${SRC_Include}
3232
)
3333

3434
add_library(${SDK_TARGET_NAMESPACE}::${LIB_NAME} ALIAS ${LIB_NAME})
35+
if(WIN32 AND (MSVC OR MINGW))
36+
message(STATUS "WIN32 AND (MSVC OR MINGW) -> set OPENDAQ_MODULE_EXPORTS")
37+
target_compile_definitions(${LIB_NAME} PUBLIC OPENDAQ_MODULE_EXPORTS)
38+
endif()
3539

3640
if (MSVC)
3741
target_compile_options(${LIB_NAME} PRIVATE /bigobj)

0 commit comments

Comments
 (0)