From 0ff025ef0edead03549092de1a9f099264acfd4a 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. Task-number: QTBUG-109394 Change-Id: Ia1ff5de36538075264c8556ef3b0416f3c15168c Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Thiago Macieira Reviewed-by: Alexey Edelev Reviewed-by: Joerg Bornemann (cherry picked from commit 7367cba9eb39c5e70aaed8982db1113c7fce5813) Reviewed-by: Qt Cherry-pick Bot --- src/network/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt index e39f13650f8..3283260c66a 100644 --- a/src/network/CMakeLists.txt +++ b/src/network/CMakeLists.txt @@ -212,6 +212,8 @@ qt_internal_extend_target(Network CONDITION WIN32 iphlpapi secur32 winhttp + DEFINES + NOMINMAX ) qt_internal_extend_target(Network CONDITION QT_FEATURE_dnslookup AND WIN32