From 94089b418e3107636f27ad6c532fdcf2dfe3eb46 Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Tue, 7 May 2024 08:11:27 +0200 Subject: [PATCH] Refs #10173: Avoid MINMAX windows warning as error in unittests Signed-off-by: Mario Dominguez --- test/unittest/dds/status/CMakeLists.txt | 1 + test/unittest/dynamic_types/CMakeLists.txt | 1 + test/unittest/xmlparser/CMakeLists.txt | 3 +++ 3 files changed, 5 insertions(+) diff --git a/test/unittest/dds/status/CMakeLists.txt b/test/unittest/dds/status/CMakeLists.txt index a3a41587fca..4e689768e9b 100644 --- a/test/unittest/dds/status/CMakeLists.txt +++ b/test/unittest/dds/status/CMakeLists.txt @@ -166,6 +166,7 @@ target_compile_definitions(ListenerTests PRIVATE $<$>,$>:__DEBUG> $<$:__INTERNALDEBUG> # Internal debug activated. $<$:_ENABLE_ATOMIC_ALIGNMENT_FIX> + $<$:NOMINMAX> # avoid conflic with std::min & std::max in visual studio ) target_include_directories(ListenerTests PRIVATE ${Asio_INCLUDE_DIR} diff --git a/test/unittest/dynamic_types/CMakeLists.txt b/test/unittest/dynamic_types/CMakeLists.txt index ce0e8ec043d..64c379a3baf 100644 --- a/test/unittest/dynamic_types/CMakeLists.txt +++ b/test/unittest/dynamic_types/CMakeLists.txt @@ -124,6 +124,7 @@ target_compile_definitions(DynamicTypesTests PRIVATE ASIO_STANDALONE $<$>,$>:__DEBUG> $<$:__INTERNALDEBUG> # Internal debug activated. + $<$:NOMINMAX> # avoid conflic with std::min & std::max in visual studio ) target_include_directories(DynamicTypesTests PRIVATE ${Asio_INCLUDE_DIR} diff --git a/test/unittest/xmlparser/CMakeLists.txt b/test/unittest/xmlparser/CMakeLists.txt index 5b31e39a7c0..15902b30ff6 100644 --- a/test/unittest/xmlparser/CMakeLists.txt +++ b/test/unittest/xmlparser/CMakeLists.txt @@ -153,6 +153,7 @@ target_compile_definitions(XMLProfileParserTests PRIVATE ASIO_STANDALONE $<$>,$>:__DEBUG> $<$:__INTERNALDEBUG> # Internal debug activated. + $<$:NOMINMAX> # avoid conflic with std::min & std::max in visual studio ) target_include_directories(XMLProfileParserTests PRIVATE ${PROJECT_SOURCE_DIR}/test/mock/rtps/Log @@ -263,6 +264,7 @@ target_compile_definitions(XMLParserTests PRIVATE ASIO_STANDALONE $<$>,$>:__DEBUG> $<$:__INTERNALDEBUG> # Internal debug activated. + $<$:NOMINMAX> # avoid conflic with std::min & std::max in visual studio ) target_include_directories(XMLParserTests PRIVATE ${PROJECT_SOURCE_DIR}/test/mock/rtps/SharedMemTransportDescriptor @@ -507,6 +509,7 @@ add_executable(XMLLoadFileTests ${XMLLOADFILE_SOURCE}) target_compile_definitions(XMLLoadFileTests PRIVATE BOOST_ASIO_STANDALONE ASIO_STANDALONE + $<$:NOMINMAX> # avoid conflic with std::min & std::max in visual studio ) target_include_directories(XMLLoadFileTests PRIVATE ${PROJECT_SOURCE_DIR}/test/mock/rtps/ReaderProxyData