summaryrefslogtreecommitdiff
path: root/Tools/qmake/mkspecs/features/win32/default_post.prf
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-06-20 16:58:05 -0700
committerThiago Macieira <thiago.macieira@intel.com>2016-07-22 20:02:38 +0000
commita6c9dd667d534d3342bfba456f9d5c146a924de0 (patch)
tree7ee419ef4fc2722a4acb8ae3f8e43ffefa618558 /Tools/qmake/mkspecs/features/win32/default_post.prf
parent0cc34edfb058f902e0f6cd0d0c1a56da66366385 (diff)
downloadqtwebkit-a6c9dd667d534d3342bfba456f9d5c146a924de0.tar.gz
Define NOMINMAX on Windows builds
windows.h has a #define macro for min and max, which causes breakage when we write things like std::max or std::numeric_limits::max(). I don't know why I suddenly started getting this, but it's a good idea to do this change. Change-Id: Ib57b52598e2f452985e9fffd1459f01996c7fb7e Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'Tools/qmake/mkspecs/features/win32/default_post.prf')
-rw-r--r--Tools/qmake/mkspecs/features/win32/default_post.prf4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tools/qmake/mkspecs/features/win32/default_post.prf b/Tools/qmake/mkspecs/features/win32/default_post.prf
index e2567233f..c296ae1f7 100644
--- a/Tools/qmake/mkspecs/features/win32/default_post.prf
+++ b/Tools/qmake/mkspecs/features/win32/default_post.prf
@@ -12,6 +12,10 @@ mingw {
QMAKE_LIBDIR_POST += $$split(TMPPATH,";")
}
+# Make sure windows.h doesn't define max() macro
+# (it screws up use like std::max and std::numeric_limits::max)
+DEFINES += NOMINMAX
+
# Disable a few warnings. The same warnings are also disabled
# in WebKitLibraries/win/tools/vsprops/common.vsprops
win32-msvc*|wince*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996