From f1494353604590bb36dd97ee7fa59537ad1b1135 Mon Sep 17 00:00:00 2001 From: Douglas Ayers Date: Wed, 31 May 2023 15:43:44 -0400 Subject: [PATCH 1/8] Fixed build issues on Windows. --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 77fd607..7fcd805 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,10 +105,10 @@ add_executable(monitor ${UI_SOURCE} ) +target_compile_features(monitor PRIVATE cxx_std_17) + if (MSVC) - target_compile_definitions(monitor PRIVATE _CRT_SECURE_NO_WARNINGS) -else() - target_compile_features(monitor PRIVATE cxx_std_17) + target_compile_definitions(monitor PRIVATE _CRT_SECURE_NO_WARNINGS _HAS_AUTO_PTR_ETC=1) endif() target_compile_options(monitor PRIVATE $<$,$,$>: -Wall -Wextra -Wpedantic -Wno-unused -Wunused-parameter> $<$: /W4>) @@ -129,9 +129,11 @@ target_link_libraries(monitor target_include_directories(monitor PRIVATE ${QWT_INCLUDE_DIR} - ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/opendds-monitor ) configure_file(opendds.ini . COPYONLY) add_subdirectory(test EXCLUDE_FROM_ALL) + + From d140fd63c34b0bd035a05d7802391102e0534f50 Mon Sep 17 00:00:00 2001 From: Douglas Ayers Date: Thu, 1 Jun 2023 07:36:48 -0400 Subject: [PATCH 2/8] Bump up windows warnings and fix one. --- CMakeLists.txt | 12 +++++++++++- src/topic_table_model.cpp | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fcd805..2760f38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,7 +108,17 @@ add_executable(monitor target_compile_features(monitor PRIVATE cxx_std_17) if (MSVC) - target_compile_definitions(monitor PRIVATE _CRT_SECURE_NO_WARNINGS _HAS_AUTO_PTR_ETC=1) + 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>) 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 { From 9960eb79ded57b572383add67d1e9ba04558b25b Mon Sep 17 00:00:00 2001 From: Douglas Ayers Date: Thu, 1 Jun 2023 07:57:24 -0400 Subject: [PATCH 3/8] Bump cmake version and change the way compiler is checked. --- CMakeLists.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2760f38..c75920a 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) @@ -107,18 +107,17 @@ add_executable(monitor target_compile_features(monitor PRIVATE cxx_std_17) -if (MSVC) +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 + /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>) From 81728a7199c8d704ceafbedd40094741e5934f52 Mon Sep 17 00:00:00 2001 From: Douglas Ayers Date: Thu, 1 Jun 2023 08:11:42 -0400 Subject: [PATCH 4/8] Dump openddw --- thirdparty/OpenDDW | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thirdparty/OpenDDW b/thirdparty/OpenDDW index 00abd06..e62af00 160000 --- a/thirdparty/OpenDDW +++ b/thirdparty/OpenDDW @@ -1 +1 @@ -Subproject commit 00abd06d7d2f303301be3ee727c3b8ef17369815 +Subproject commit e62af0033eb233d0f315544113b413607699c1b3 From 3ebfb64e24efc82861a25f1af78b5012083b46a6 Mon Sep 17 00:00:00 2001 From: Douglas Ayers Date: Mon, 5 Jun 2023 08:22:48 -0400 Subject: [PATCH 5/8] Auto moc and some minor changes. --- CMakeLists.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c75920a..f0700a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 @@ -105,11 +103,14 @@ add_executable(monitor ${UI_SOURCE} ) +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. @@ -137,12 +138,10 @@ target_link_libraries(monitor ) target_include_directories(monitor PRIVATE + ${CMAKE_CURRENT_BINARY_DIR} ${QWT_INCLUDE_DIR} - ${CMAKE_BINARY_DIR}/opendds-monitor ) configure_file(opendds.ini . COPYONLY) add_subdirectory(test EXCLUDE_FROM_ALL) - - From d2d026297d8949d568dacc8788bf3209ddb7c36d Mon Sep 17 00:00:00 2001 From: Douglas Ayers Date: Mon, 12 Jun 2023 10:13:05 -0400 Subject: [PATCH 6/8] Removed qt5 wrap call which wasn't needed. --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f0700a8..549b6ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,8 +93,6 @@ qt5_wrap_cpp(MOC_SOURCE src/topic_table_model.h ) -qt5_wrap_ui(UI_SOURCE ${UI}) - add_executable(monitor ${SOURCE} ${HEADER} From 7e9cda8e687274734ee73277a5f6fd5fecf7132f Mon Sep 17 00:00:00 2001 From: Douglas Ayers Date: Fri, 7 Jul 2023 12:04:24 -0400 Subject: [PATCH 7/8] Removed include dir that was no longer needed. --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 549b6ee..4d35e99 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,7 +136,6 @@ target_link_libraries(monitor ) target_include_directories(monitor PRIVATE - ${CMAKE_CURRENT_BINARY_DIR} ${QWT_INCLUDE_DIR} ) From 69defea84c00c80884a3edf5cb65e50433246605 Mon Sep 17 00:00:00 2001 From: Douglas Ayers Date: Fri, 7 Jul 2023 12:15:30 -0400 Subject: [PATCH 8/8] Bump opendds --- thirdparty/OpenDDW | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thirdparty/OpenDDW b/thirdparty/OpenDDW index e62af00..5814b2c 160000 --- a/thirdparty/OpenDDW +++ b/thirdparty/OpenDDW @@ -1 +1 @@ -Subproject commit e62af0033eb233d0f315544113b413607699c1b3 +Subproject commit 5814b2cb03cdbc99fb718e10ba80f97efe4dee83