Skip to content

Commit

Permalink
Refs #10173: Avoid MINMAX windows warning as error in unittests
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
  • Loading branch information
Mario-DL committed May 7, 2024
1 parent 494b66c commit 94089b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/unittest/dds/status/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ target_compile_definitions(ListenerTests PRIVATE
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">>:__DEBUG>
$<$<BOOL:${INTERNAL_DEBUG}>:__INTERNALDEBUG> # Internal debug activated.
$<$<BOOL:${WIN32}>:_ENABLE_ATOMIC_ALIGNMENT_FIX>
$<$<BOOL:${MSVC}>:NOMINMAX> # avoid conflic with std::min & std::max in visual studio
)
target_include_directories(ListenerTests PRIVATE
${Asio_INCLUDE_DIR}
Expand Down
1 change: 1 addition & 0 deletions test/unittest/dynamic_types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ target_compile_definitions(DynamicTypesTests PRIVATE
ASIO_STANDALONE
$<$<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
)
target_include_directories(DynamicTypesTests PRIVATE
${Asio_INCLUDE_DIR}
Expand Down
3 changes: 3 additions & 0 deletions test/unittest/xmlparser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ target_compile_definitions(XMLProfileParserTests PRIVATE
ASIO_STANDALONE
$<$<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
)
target_include_directories(XMLProfileParserTests PRIVATE
${PROJECT_SOURCE_DIR}/test/mock/rtps/Log
Expand Down Expand Up @@ -263,6 +264,7 @@ target_compile_definitions(XMLParserTests PRIVATE
ASIO_STANDALONE
$<$<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
)
target_include_directories(XMLParserTests PRIVATE
${PROJECT_SOURCE_DIR}/test/mock/rtps/SharedMemTransportDescriptor
Expand Down Expand Up @@ -507,6 +509,7 @@ add_executable(XMLLoadFileTests ${XMLLOADFILE_SOURCE})
target_compile_definitions(XMLLoadFileTests PRIVATE
BOOST_ASIO_STANDALONE
ASIO_STANDALONE
$<$<BOOL:${MSVC}>:NOMINMAX> # avoid conflic with std::min & std::max in visual studio
)
target_include_directories(XMLLoadFileTests PRIVATE
${PROJECT_SOURCE_DIR}/test/mock/rtps/ReaderProxyData
Expand Down

0 comments on commit 94089b4

Please sign in to comment.