diff --git a/CMakeLists.txt b/CMakeLists.txt index 77fd607..4d35e99 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.20) -project(opendds-monitor VERSION 0.0.1 LANGUAGES CXX) +project(monitor VERSION 0.0.1 LANGUAGES CXX) find_package(OpenDDS REQUIRED) @@ -23,8 +23,6 @@ else() find_package(Qwt MODULE REQUIRED) endif() -set(CMAKE_AUTOMOC FALSE) - set(HEADER src/dds_data.h src/dynamic_meta_struct.h @@ -95,8 +93,6 @@ qt5_wrap_cpp(MOC_SOURCE src/topic_table_model.h ) -qt5_wrap_ui(UI_SOURCE ${UI}) - add_executable(monitor ${SOURCE} ${HEADER} @@ -105,10 +101,22 @@ add_executable(monitor ${UI_SOURCE} ) -if (MSVC) - target_compile_definitions(monitor PRIVATE _CRT_SECURE_NO_WARNINGS) -else() - target_compile_features(monitor PRIVATE cxx_std_17) +set_property(TARGET monitor PROPERTY AUTOUIC TRUE) +set_property(TARGET monitor APPEND PROPERTY AUTOUIC_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/ui") + +target_compile_features(monitor PRIVATE cxx_std_17) + +if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + target_compile_definitions(monitor PRIVATE _CRT_SECURE_NO_WARNINGS _HAS_AUTO_PTR_ETC=1) + + target_compile_options(monitor PRIVATE + /W4 # Set the warning level to "Level4" + /wd4251 #Must have dll-interface to be used by clients of struct. + /wd4244 #Conversion warning from ACE. + /wd4250 #inherits via dominance + /wd4275 #non dll-interface class used as base for dll-interface class + /WX # Warnings are errors!!!! + ) endif() target_compile_options(monitor PRIVATE $<$,$,$>: -Wall -Wextra -Wpedantic -Wno-unused -Wunused-parameter> $<$: /W4>) @@ -129,7 +137,6 @@ target_link_libraries(monitor target_include_directories(monitor PRIVATE ${QWT_INCLUDE_DIR} - ${CMAKE_BINARY_DIR} ) configure_file(opendds.ini . COPYONLY) diff --git a/src/topic_table_model.cpp b/src/topic_table_model.cpp index c01023e..0072274 100644 --- a/src/topic_table_model.cpp +++ b/src/topic_table_model.cpp @@ -801,7 +801,7 @@ void TopicTableModel::parseAggregated(const DDS::DynamicData_var& data, const st case OpenDDS::XTypes::TK_STRUCTURE: case OpenDDS::XTypes::TK_UNION: { DDS::DynamicData_var nested_data; - DDS::ReturnCode_t ret = data->get_complex_value(nested_data, id); + ret = data->get_complex_value(nested_data, id); if (ret != DDS::RETCODE_OK) { std::cerr << "get_complex_value for member Id " << id << " failed" << std::endl; } else { diff --git a/thirdparty/OpenDDW b/thirdparty/OpenDDW index 00abd06..5814b2c 160000 --- a/thirdparty/OpenDDW +++ b/thirdparty/OpenDDW @@ -1 +1 @@ -Subproject commit 00abd06d7d2f303301be3ee727c3b8ef17369815 +Subproject commit 5814b2cb03cdbc99fb718e10ba80f97efe4dee83