Skip to content
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
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
cmake_minimum_required(VERSION 3.25)

set(REPO_NAME MqttModule)
Expand Down Expand Up @@ -28,6 +28,7 @@ else()
endif()

# options
set(OPENDAQ_ENABLE_UNITY_LIBS ON CACHE BOOL "Unity builds for libraries")
opendaq_setup_common_build_options()
opendaq_setup_project_specific_build_options(${REPO_OPTION_PREFIX})
option(${REPO_OPTION_PREFIX}_ENABLE_EXAMPLE_APP "Enable ${REPO_NAME} example applications" ${PROJECT_IS_TOP_LEVEL})
Expand Down
2 changes: 1 addition & 1 deletion cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include(FetchContent)
FetchContent_Declare(
opendaq-cmake-utils
GIT_REPOSITORY https://github.com/openDAQ/opendaq-cmake-utils.git
GIT_TAG v1.0.1
GIT_TAG v1.1.0
GIT_PROGRESS ON
)
FetchContent_MakeAvailable(opendaq-cmake-utils)
3 changes: 3 additions & 0 deletions modules/mqtt_streaming_module/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ add_library(${LIB_NAME} SHARED ${SRC_Include}
)
add_library(${SDK_TARGET_NAMESPACE}::${LIB_NAME} ALIAS ${LIB_NAME})

opendaq_target_pch(${LIB_NAME} <opendaq/opendaq.h>)
opendaq_target_unity_libs(${LIB_NAME} BATCH_SIZE 4)

if(${REPO_OPTION_PREFIX}_ENABLE_TESTS)
target_compile_definitions(${LIB_NAME}
PRIVATE ${REPO_OPTION_PREFIX}_ENABLE_TESTS
Expand Down
6 changes: 6 additions & 0 deletions modules/mqtt_streaming_module/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ if (MSVC)
target_compile_options(${TEST_APP} PRIVATE /bigobj)
endif()

opendaq_target_pch(${TEST_APP} <opendaq/opendaq.h> <gtest/gtest.h>)

# test_app.cpp defines main().
set_source_files_properties(test_app.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
opendaq_target_unity_tests(${TEST_APP} BATCH_SIZE 4)

add_custom_command(
TARGET ${TEST_APP} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
Expand Down
2 changes: 1 addition & 1 deletion opendaq_ref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
eb11da4eee3b966778a6a9b82397352f2ff843d1
47593806ee16fbd5ea6b19f1f32309b583bb9a52
3 changes: 3 additions & 0 deletions shared/mqtt_streaming_protocol/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ add_library(${LIB_NAME} STATIC ${SRC_Cpp}

add_library(${SDK_TARGET_NAMESPACE}::${LIB_NAME} ALIAS ${LIB_NAME})

opendaq_target_pch(${LIB_NAME} <opendaq/opendaq.h>)
opendaq_target_unity_libs(${LIB_NAME} BATCH_SIZE 4)

if(BUILD_64Bit OR BUILD_ARM)
set_target_properties(${LIB_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
else()
Expand Down
2 changes: 2 additions & 0 deletions shared/mqtt_streaming_protocol/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ target_link_libraries(${TEST_APP} PRIVATE daq::opendaq_test_utils
${TEST_LIB}
)

opendaq_target_pch(${TEST_APP} <opendaq/opendaq.h> <gtest/gtest.h>)

add_test(NAME ${TEST_APP}
COMMAND $<TARGET_FILE_NAME:${TEST_APP}>
WORKING_DIRECTORY $<TARGET_FILE_DIR:${TEST_APP}>
Expand Down
Loading