Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[19546] Use FASTRTPS_NO_LIB on unittest root folder (backport #3856) #3871

Merged
merged 1 commit into from
Oct 26, 2023
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
2 changes: 2 additions & 0 deletions test/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

add_compile_definitions(FASTRTPS_NO_LIB)

add_subdirectory(rtps/common)
add_subdirectory(rtps/DataSharing)
add_subdirectory(rtps/builtin)
Expand Down
2 changes: 1 addition & 1 deletion test/unittest/dds/collections/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ set(LOANABLE_SEQUENCE_TESTS_SOURCE
LoanableSequenceTests.cpp)

add_executable(LoanableSequenceTests ${LOANABLE_SEQUENCE_TESTS_SOURCE})
target_compile_definitions(LoanableSequenceTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(LoanableSequenceTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand Down
8 changes: 4 additions & 4 deletions test/unittest/dds/core/condition/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ set(CONDITION_TESTS_SOURCE
ConditionTests.cpp)

add_executable(ConditionTests ${CONDITION_TESTS_SOURCE})
target_compile_definitions(ConditionTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(ConditionTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -57,7 +57,7 @@ set(CONDITION_NOTIFIER_TESTS_SOURCE
ConditionNotifierTests.cpp)

add_executable(ConditionNotifierTests ${CONDITION_NOTIFIER_TESTS_SOURCE})
target_compile_definitions(ConditionNotifierTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(ConditionNotifierTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -81,7 +81,7 @@ set(STATUS_CONDITION_IMPL_TESTS_SOURCE
StatusConditionImplTests.cpp)

add_executable(StatusConditionImplTests ${STATUS_CONDITION_IMPL_TESTS_SOURCE})
target_compile_definitions(StatusConditionImplTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(StatusConditionImplTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -104,7 +104,7 @@ set(WAITSET_IMPL_TESTS_SOURCE
WaitSetImplTests.cpp)

add_executable(WaitSetImplTests ${WAITSET_IMPL_TESTS_SOURCE})
target_compile_definitions(WaitSetImplTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(WaitSetImplTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand Down
2 changes: 1 addition & 1 deletion test/unittest/dds/core/entity/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if(ANDROID)
endif()

add_executable(EntityTests ${ENTITY_TESTS_SOURCE})
target_compile_definitions(EntityTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(EntityTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand Down
2 changes: 1 addition & 1 deletion test/unittest/dds/participant/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ endif()


add_executable(ParticipantTests ${PARTICIPANTTESTS_SOURCE})
target_compile_definitions(ParticipantTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(ParticipantTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand Down
4 changes: 2 additions & 2 deletions test/unittest/dds/publisher/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ if(ANDROID)
endif()

add_executable(PublisherTests ${PUBLISHERTESTS_SOURCE})
target_compile_definitions(PublisherTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(PublisherTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -330,7 +330,7 @@ endif()
add_gtest(PublisherTests SOURCES ${PUBLISHERTESTS_SOURCE})

add_executable(DataWriterTests ${DATAWRITERTESTS_SOURCE})
target_compile_definitions(DataWriterTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(DataWriterTests PRIVATE
BOOST_ASIO_STANDALONE
ASIO_STANDALONE
ASIO_DISABLE_VISIBILITY
Expand Down
2 changes: 1 addition & 1 deletion test/unittest/dds/status/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ if(ANDROID)
endif()

add_executable(ListenerTests ${LISTENERTESTS_SOURCE})
target_compile_definitions(ListenerTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(ListenerTests PRIVATE
BOOST_ASIO_STANDALONE
ASIO_STANDALONE
ASIO_DISABLE_VISIBILITY
Expand Down
8 changes: 4 additions & 4 deletions test/unittest/dds/subscriber/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if(ANDROID)
endif()

add_executable(SubscriberTests ${SUBSCRIBERTESTS_SOURCE})
target_compile_definitions(SubscriberTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(SubscriberTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -70,7 +70,7 @@ target_link_libraries(SubscriberTests fastrtps fastcdr foonathan_memory
add_gtest(SubscriberTests SOURCES ${SUBSCRIBERTESTS_SOURCE})

add_executable(DataReaderTests ${DATAREADERTESTS_SOURCE})
target_compile_definitions(DataReaderTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(DataReaderTests PRIVATE
BOOST_ASIO_STANDALONE
ASIO_STANDALONE
ASIO_DISABLE_VISIBILITY
Expand All @@ -88,7 +88,7 @@ target_link_libraries(DataReaderTests fastrtps fastcdr foonathan_memory
add_gtest(DataReaderTests SOURCES ${DATAREADERTESTS_SOURCE})

add_executable(DataReaderInstanceTests ${DATAREADERINSTANCETESTS_SOURCE})
target_compile_definitions(DataReaderInstanceTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(DataReaderInstanceTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -102,7 +102,7 @@ target_link_libraries(DataReaderInstanceTests foonathan_memory
add_gtest(DataReaderInstanceTests SOURCES ${DATAREADERINSTANCETESTS_SOURCE})

add_executable(DataReaderHistoryTests ${DATAREADERHISTORYTESTS_SOURCE})
target_compile_definitions(DataReaderHistoryTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(DataReaderHistoryTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
$<$<BOOL:${MSVC}>:NOMINMAX> # avoid conflic with std::min & std::max in visual studio
Expand Down
2 changes: 1 addition & 1 deletion test/unittest/dds/topic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if(WIN32)
endif()

add_executable(TopicTests ${TOPICTESTS_SOURCE})
target_compile_definitions(TopicTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(TopicTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand Down
2 changes: 1 addition & 1 deletion test/unittest/dds/topic/DDSSQLFilter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ add_executable(DDSSQLFilterTests
${DDSSQLFILTER_SOURCES}
${DDSSQLFILTER_LIB_SOURCES}
)
target_compile_definitions(DDSSQLFilterTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(DDSSQLFilterTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand Down
6 changes: 3 additions & 3 deletions test/unittest/dynamic_types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ set(DYNAMIC_TYPES_4_2_TEST_SOURCE
include_directories(mock/)

add_executable(DynamicTypesTests ${DYNAMIC_TYPES_TEST_SOURCE})
target_compile_definitions(DynamicTypesTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(DynamicTypesTests PRIVATE
BOOST_ASIO_STANDALONE
ASIO_STANDALONE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
Expand Down Expand Up @@ -140,7 +140,7 @@ add_gtest(DynamicTypesTests SOURCES ${DYNAMIC_TYPES_TEST_SOURCE})


add_executable(DynamicComplexTypesTests ${DYNAMIC_COMPLEX_TYPES_TEST_SOURCE})
target_compile_definitions(DynamicComplexTypesTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(DynamicComplexTypesTests PRIVATE
BOOST_ASIO_STANDALONE
ASIO_STANDALONE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
Expand All @@ -164,7 +164,7 @@ add_gtest(DynamicComplexTypesTests SOURCES ${DYNAMIC_COMPLEX_TYPES_TEST_SOURCE})


add_executable(DynamicTypes_4_2_Tests ${DYNAMIC_TYPES_4_2_TEST_SOURCE})
target_compile_definitions(DynamicTypes_4_2_Tests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(DynamicTypes_4_2_Tests PRIVATE
BOOST_ASIO_STANDALONE
ASIO_STANDALONE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
Expand Down
4 changes: 2 additions & 2 deletions test/unittest/logging/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ set(LOGTESTS_SOURCE
include_directories(mock/)

add_executable(LogTests ${LOGTESTS_SOURCE})
target_compile_definitions(LogTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(LogTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
HAVE_LOG_NO_INFO=0 FASTDDS_ENFORCE_LOG_INFO # logInfo is used in some tests
Expand Down Expand Up @@ -71,7 +71,7 @@ if(TINYXML2_INCLUDE_DIR)
endif(TINYXML2_INCLUDE_DIR)

add_executable(LogFileTests ${LOGFILETESTS_SOURCE})
target_compile_definitions(LogFileTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(LogFileTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand Down
16 changes: 8 additions & 8 deletions test/unittest/logging/log_macros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ set(LOGMACROS_SOURCE
${LOGMACROS_ALL_TEST_SOURCE})

add_executable(LogMacrosAllActiveTests ${LOGMACROS_SOURCE})
target_compile_definitions(LogMacrosAllActiveTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(LogMacrosAllActiveTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -53,7 +53,7 @@ set(LOGMACROS_SOURCE
${LOGMACROS_NOINFO_TEST_SOURCE})

add_executable(LogMacrosNoInfoTests ${LOGMACROS_SOURCE})
target_compile_definitions(LogMacrosNoInfoTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(LogMacrosNoInfoTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -74,7 +74,7 @@ set(LOGMACROS_SOURCE
${LOGMACROS_NOWARNING_TEST_SOURCE})

add_executable(LogMacrosNoWarningTests ${LOGMACROS_SOURCE})
target_compile_definitions(LogMacrosNoWarningTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(LogMacrosNoWarningTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -95,7 +95,7 @@ set(LOGMACROS_SOURCE
${LOGMACROS_NOERROR_TEST_SOURCE})

add_executable(LogMacrosNoErrorTests ${LOGMACROS_SOURCE})
target_compile_definitions(LogMacrosNoErrorTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(LogMacrosNoErrorTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -116,7 +116,7 @@ set(LOGMACROS_SOURCE
${LOGMACROS_DEFAULT_TEST_SOURCE})

add_executable(LogMacrosDefaultTests ${LOGMACROS_SOURCE})
target_compile_definitions(LogMacrosDefaultTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(LogMacrosDefaultTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -139,7 +139,7 @@ set(LOGMACROS_SOURCE
${LOGMACROS_INTERNALDEBUG_TEST_SOURCE})

add_executable(LogMacrosInternalDebugOffTests ${LOGMACROS_SOURCE})
target_compile_definitions(LogMacrosInternalDebugOffTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(LogMacrosInternalDebugOffTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -159,7 +159,7 @@ set(LOGMACROS_SOURCE
${LOGMACROS_ALL_TEST_SOURCE})

add_executable(OldLogMacrosTests ${LOGMACROS_SOURCE})
target_compile_definitions(OldLogMacrosTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(OldLogMacrosTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -180,7 +180,7 @@ set(LOGMACROS_SOURCE
${LOGMACROS_ALL_TEST_SOURCE})

add_executable(OldLogMacrosDisableTests ${LOGMACROS_SOURCE})
target_compile_definitions(OldLogMacrosDisableTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(OldLogMacrosDisableTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand Down
2 changes: 1 addition & 1 deletion test/unittest/rtps/DataSharing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if(WIN32)
endif()

add_executable(SHMSegmentTests ${SHMSEGMENTTESTS_SOURCE})
target_compile_definitions(SHMSegmentTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(SHMSegmentTests PRIVATE
BOOST_ASIO_STANDALONE
ASIO_STANDALONE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
Expand Down
2 changes: 1 addition & 1 deletion test/unittest/rtps/builtin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ endif()


add_executable(BuiltinDataSerializationTests ${BUILTIN_DATA_SERIALIZATION_TESTS_SOURCE})
target_compile_definitions(BuiltinDataSerializationTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(BuiltinDataSerializationTests PRIVATE
BOOST_ASIO_STANDALONE
ASIO_STANDALONE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
Expand Down
16 changes: 8 additions & 8 deletions test/unittest/rtps/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ set(TIMETESTS_SOURCE TimeTests.cpp
${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/Time_t.cpp)

add_executable(CacheChangeTests ${CACHECHANGETESTS_SOURCE})
target_compile_definitions(CacheChangeTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(CacheChangeTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -59,7 +59,7 @@ target_link_libraries(CacheChangeTests GTest::gtest)
add_gtest(CacheChangeTests SOURCES ${CACHECHANGETESTS_SOURCE})

add_executable(GuidUtilsTests ${GUID_UTILS_TESTS_SOURCE})
target_compile_definitions(GuidUtilsTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(GuidUtilsTests PRIVATE
BOOST_ASIO_STANDALONE
ASIO_STANDALONE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
Expand All @@ -80,7 +80,7 @@ endif()
add_gtest(GuidUtilsTests SOURCES ${GUID_UTILS_TESTS_SOURCE})

add_executable(SequenceNumberTests ${SEQUENCENUMBERTESTS_SOURCE})
target_compile_definitions(SequenceNumberTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(SequenceNumberTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -90,7 +90,7 @@ target_link_libraries(SequenceNumberTests GTest::gtest)
add_gtest(SequenceNumberTests SOURCES ${SEQUENCENUMBERTESTS_SOURCE})

add_executable(PortParametersTests ${PORTPARAMETERSTESTS_SOURCE})
target_compile_definitions(PortParametersTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(PortParametersTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -107,7 +107,7 @@ add_gtest(PortParametersTests SOURCES ${PORTPARAMETERSTESTS_SOURCE} LABELS "NoMe
set(GUIDPREFIXTESTS_SOURCE GuidPrefixTests.cpp)

add_executable(GuidPrefixTests ${GUIDPREFIXTESTS_SOURCE})
target_compile_definitions(GuidPrefixTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(GuidPrefixTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -124,7 +124,7 @@ add_gtest(GuidPrefixTests SOURCES ${GUIDPREFIXTESTS_SOURCE} LABELS "NoMemoryChec
set(ENTITYIDTESTS_SOURCE EntityIdTests.cpp)

add_executable(EntityIdTests ${ENTITYIDTESTS_SOURCE})
target_compile_definitions(EntityIdTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(EntityIdTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -141,7 +141,7 @@ add_gtest(EntityIdTests SOURCES ${ENTITYIDTESTS_SOURCE} LABELS "NoMemoryCheck")
set(GUIDTESTS_SOURCE GuidTests.cpp)

add_executable(GuidTests ${GUIDTESTS_SOURCE})
target_compile_definitions(GuidTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(GuidTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -166,7 +166,7 @@ endif()
#############

add_executable(TimeTests ${TIMETESTS_SOURCE})
target_compile_definitions(TimeTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(TimeTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand Down
2 changes: 1 addition & 1 deletion test/unittest/rtps/discovery/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if(WIN32)
endif()

add_executable(EdpTests ${EDPTESTS_SOURCE})
target_compile_definitions(EdpTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(EdpTests PRIVATE
BOOST_ASIO_STANDALONE
ASIO_STANDALONE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
Expand Down
6 changes: 3 additions & 3 deletions test/unittest/rtps/flowcontrol/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ set(FLOWCONTROLLERFACTORYTESTS_SOURCE
)

add_executable(FlowControllerFactoryTests ${FLOWCONTROLLERFACTORYTESTS_SOURCE})
target_compile_definitions(FlowControllerFactoryTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(FlowControllerFactoryTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand Down Expand Up @@ -63,7 +63,7 @@ set(FLOWCONTROLLERPUBLISHMODESTESTS_SOURCE
)

add_executable(FlowControllerPublishModesTests ${FLOWCONTROLLERPUBLISHMODESTESTS_SOURCE})
target_compile_definitions(FlowControllerPublishModesTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(FlowControllerPublishModesTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand All @@ -87,7 +87,7 @@ set(FLOWCONTROLLERSCHEDULERSTESTS_SOURCE
)

add_executable(FlowControllerSchedulersTests ${FLOWCONTROLLERSCHEDULERSTESTS_SOURCE})
target_compile_definitions(FlowControllerSchedulersTests PRIVATE FASTRTPS_NO_LIB
target_compile_definitions(FlowControllerSchedulersTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
)
Expand Down
Loading
Loading