From bc1513c649dc6e8d8c4ab161537b1a2f12d41d3c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 28 Dec 2020 18:06:00 +0100 Subject: [PATCH 1/3] cmake lists updates --- CMakeLists.txt | 1 - osal/host/CMakeLists.txt | 4 +++- osal/linux/CMakeLists.txt | 14 ++++++++++---- unittest/CMakeLists.txt | 2 ++ 4 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 unittest/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 02849ca4..3cc5ffd5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,5 +139,4 @@ target_include_directories(${LIB_FSFW_NAME} PRIVATE target_compile_options(${LIB_FSFW_NAME} PRIVATE ${WARNING_FLAGS} ${COMPILER_FLAGS} - ${ABI_FLAGS} ) diff --git a/osal/host/CMakeLists.txt b/osal/host/CMakeLists.txt index aa32990b..367f721e 100644 --- a/osal/host/CMakeLists.txt +++ b/osal/host/CMakeLists.txt @@ -13,9 +13,11 @@ target_sources(${LIB_FSFW_NAME} ) if(UNIX) + find_package(Threads REQUIRED) + target_link_libraries(${LIB_FSFW_NAME} PRIVATE rt - pthread + ${CMAKE_THREAD_LIBS_INIT} ) endif() \ No newline at end of file diff --git a/osal/linux/CMakeLists.txt b/osal/linux/CMakeLists.txt index c0096e42..474e548b 100644 --- a/osal/linux/CMakeLists.txt +++ b/osal/linux/CMakeLists.txt @@ -18,8 +18,14 @@ target_sources(${LIB_FSFW_NAME} Timer.cpp ) -target_link_libraries(${LIB_FSFW_NAME} - PRIVATE - rt - pthread +find_package(Threads REQUIRED) + +target_link_libraries(${LIB_FSFW_NAME} PRIVATE + ${CMAKE_THREAD_LIBS_INIT} + rt ) + +target_link_libraries(${LIB_FSFW_NAME} INTERFACE + ${CMAKE_THREAD_LIBS_INIT} +) + diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt new file mode 100644 index 00000000..119ef243 --- /dev/null +++ b/unittest/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(internal) +add_subdirectory(tests) \ No newline at end of file From c8af75f9c754816dba4561baf64aa5e8753406fb Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 28 Dec 2020 18:06:34 +0100 Subject: [PATCH 2/3] moved inlcudes --- defaultcfg/fsfwconfig/OBSWConfig.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/defaultcfg/fsfwconfig/OBSWConfig.h b/defaultcfg/fsfwconfig/OBSWConfig.h index 8ad2cb67..6ed8ea2c 100644 --- a/defaultcfg/fsfwconfig/OBSWConfig.h +++ b/defaultcfg/fsfwconfig/OBSWConfig.h @@ -3,11 +3,12 @@ #include "OBSWVersion.h" +#ifdef __cplusplus + #include "objects/systemObjectList.h" #include "events/subsystemIdRanges.h" #include "returnvalues/classIds.h" -#ifdef __cplusplus namespace config { #endif From 0a4d0b593713e61b7ddf47ecb4b1657d8a0a8674 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Wed, 30 Dec 2020 22:34:40 +0100 Subject: [PATCH 3/3] bugfix --- devicehandlers/DeviceHandlerBase.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/devicehandlers/DeviceHandlerBase.cpp b/devicehandlers/DeviceHandlerBase.cpp index d0630854..251320cb 100644 --- a/devicehandlers/DeviceHandlerBase.cpp +++ b/devicehandlers/DeviceHandlerBase.cpp @@ -682,8 +682,10 @@ void DeviceHandlerBase::doGetRead() { replyRawData(receivedData, receivedDataLen, requestedRawTraffic); } - if (mode == MODE_RAW and defaultRawReceiver != MessageQueueIF::NO_QUEUE) { - replyRawReplyIfnotWiretapped(receivedData, receivedDataLen); + if (mode == MODE_RAW) { + if (defaultRawReceiver != MessageQueueIF::NO_QUEUE) { + replyRawReplyIfnotWiretapped(receivedData, receivedDataLen); + } } else { parseReply(receivedData, receivedDataLen);