From b3dcc4488b9a7b4241df7ddfa5729accbb865ce3 Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Mon, 14 May 2012 10:15:06 +0200
Subject: [PATCH] Fixed a compiler error on VS with std::numeric_limits.

---
 scripts/cmake/CompilerSetup.cmake | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/cmake/CompilerSetup.cmake b/scripts/cmake/CompilerSetup.cmake
index 9de02148abe..72a7e8c67b8 100644
--- a/scripts/cmake/CompilerSetup.cmake
+++ b/scripts/cmake/CompilerSetup.cmake
@@ -63,6 +63,7 @@ IF (WIN32)
 			-D_CRT_NONSTDC_NO_WARNINGS
 			-D_CRT_XNONSTDC_NO_WARNINGS
 			-D__restrict__=__restrict   # this fixes #5
+			-DNOMINMAX # This fixes compile errors with std::numeric_limits<T>::min() / max()
 		)
 		# Sets warning level 3 and ignores some warnings
 		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /wd4290 /wd4267")
-- 
GitLab