From 7367cba9eb39c5e70aaed8982db1113c7fce5813 Mon Sep 17 00:00:00 2001 From: Amir Masoud Abdol Date: Wed, 17 May 2023 09:58:08 +0200 Subject: [PATCH] Compile Network with NOMINMAX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Windows, when building using Unity Build, min/max macro form `window.h` makes it to some files, and messes up evaluation of code like `std::numeric_limits::max()` which leads to compilation error. We don't use min/max macros in Qt base, and it might be the time to pass NOMINMAX to our targets. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ia1ff5de36538075264c8556ef3b0416f3c15168c Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Thiago Macieira Reviewed-by: Alexey Edelev Reviewed-by: Joerg Bornemann --- src/network/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt index 1c625042ab1..fcd31fe9797 100644 --- a/src/network/CMakeLists.txt +++ b/src/network/CMakeLists.txt @@ -198,6 +198,8 @@ qt_internal_extend_target(Network CONDITION WIN32 iphlpapi secur32 winhttp + DEFINES + NOMINMAX ) qt_internal_extend_target(Network CONDITION APPLE AND NOT UIKIT