From 95d1808924d9ecdf3037939ba78950fe20ee1396 Mon Sep 17 00:00:00 2001 From: Hannah von Reth Date: Sat, 17 Jul 2021 14:27:16 +0200 Subject: Define NOMINMAX on Windows This will prevent the macro definition of min and max which breaks the use of std::min and std::max --- kde-modules/KDECompilerSettings.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'kde-modules/KDECompilerSettings.cmake') diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake index 796aacda..9f03977b 100644 --- a/kde-modules/KDECompilerSettings.cmake +++ b/kde-modules/KDECompilerSettings.cmake @@ -346,6 +346,10 @@ if (WIN32) # As stated in http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx M_PI only gets defined # if _USE_MATH_DEFINES is defined, with mingw this has a similar effect as -D_GNU_SOURCE on math.h _kde_add_platform_definitions(-D_USE_MATH_DEFINES) + + # Don't define MIN and MAX in windows.h + # the defines break the use of std::max + _kde_add_platform_definitions(-DNOMINMAX) endif() -- cgit v1.2.1