Skip to content

Commit

Permalink
Fix: macro redefinition warnings, add bmqstoragetool.td target (#229)
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandr Ivanov <[email protected]>
  • Loading branch information
alexander-e1off authored Mar 29, 2024
1 parent 1de0b4e commit 9f34985
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
17 changes: 7 additions & 10 deletions etc/cmake/BMQTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@ function(bmq_add_application_test target)
add_custom_target(${target}.t)
endif()
add_dependencies(${target}.t ${lib_target}.t)

if(_COMPAT)
if (NOT TARGET ${target}.td)
add_custom_target(${target}.td)
endif()
add_dependencies(${target}.td ${lib_target}.t)
endif()
endif()

if (${lib_target}_TEST_TARGETS)
Expand All @@ -203,16 +210,6 @@ function(bmq_add_application_test target)
set(td_manifest)

if(${lib_target}_TEST_TARGETS)

if(NOT TARGET ${lib_target}.t)
add_custom_target(${lib_target}.t)
if(_COMPAT)
add_custom_target(${lib_target}.td)
endif()
endif()

add_dependencies(${lib_target}.t ${${lib_target}_TEST_TARGETS})

if(_COMPAT)
foreach(test_target ${${lib_target}_TEST_TARGETS})
string(REPLACE ".t" "" component ${test_target})
Expand Down
9 changes: 9 additions & 0 deletions src/applications/bmqstoragetool/m_bmqstoragetool_testutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@

// GMOCK
#include <gmock/gmock.h>
// Undefine macroses from gtest.h which are defined in mwctst_testhelper.h
#undef ASSERT_EQ
#undef ASSERT_NE
#undef ASSERT_LT
#undef ASSERT_LE
#undef ASSERT_GT
#undef ASSERT_GE
#undef TEST_F
#undef TEST

// TEST DRIVER
#include <mwctst_testhelper.h>
Expand Down

0 comments on commit 9f34985

Please sign in to comment.