From 395c40f40d3246b89166b5b40df81cfe7a313c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Fri, 16 Oct 2009 12:46:28 +0000 Subject: [PATCH] Throw Error when NOMINMAX is not defined on windows git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@213 fdac6126-5c0c-442c-9429-916003d36597 --- src/OpenMesh/Core/System/config.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/OpenMesh/Core/System/config.h b/src/OpenMesh/Core/System/config.h index fd309b39..fc7bfdcd 100644 --- a/src/OpenMesh/Core/System/config.h +++ b/src/OpenMesh/Core/System/config.h @@ -65,6 +65,17 @@ #define OM_GET_MAJ ((OM_VERSION && 0x0ff00) >> 8) #define OM_GET_MIN (OM_VERSION && 0x000ff) +#ifdef WIN32 +# ifdef min +# pragma message("Detected min macro! OpenMesh does not compiled with min/max macros active! Please add a define NOMINMAX to your compiler flags !") +# error min macro active +# endif +# ifdef max +# pragma message("Detected max macro! OpenMesh does not compiled with min/max macros active! Please add a define NOMINMAX to your compiler flags !") +# error max macro active +# endif +#endif + typedef unsigned int uint; //============================================================================= #endif // OPENMESH_CONFIG_H defined