From 76f0d13b8494c80764c8e94dfc09913f33dec621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20M=C3=B6ller?= Date: Mon, 12 Aug 2013 13:24:29 +0000 Subject: [PATCH] enable deprecated warning for msvc git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@925 fdac6126-5c0c-442c-9429-916003d36597 --- CMakeLists.txt | 1 + src/OpenMesh/Core/System/compiler.hh | 1 - src/OpenMesh/Tools/Utils/conio.cc | 17 ++++++++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9588c722..6eb068b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,7 @@ include (ACGOutput) if (WIN32) add_definitions( -D_USE_MATH_DEFINES -DNOMINMAX + -D_CRT_SECURE_NO_WARNINGS ) endif () diff --git a/src/OpenMesh/Core/System/compiler.hh b/src/OpenMesh/Core/System/compiler.hh index 732d36b9..40891fc6 100644 --- a/src/OpenMesh/Core/System/compiler.hh +++ b/src/OpenMesh/Core/System/compiler.hh @@ -85,7 +85,6 @@ # define OM_PARTIAL_SPECIALIZATION 1 # define OM_INCLUDE_TEMPLATES 1 # elif (_MSC_VER >= 1400) // settings for .NET 2005 (NOTE: not fully tested) -# pragma warning(disable : 4996) # define OM_TYPENAME # define OM_OUT_OF_CLASS_TEMPLATE 1 # define OM_PARTIAL_SPECIALIZATION 1 diff --git a/src/OpenMesh/Tools/Utils/conio.cc b/src/OpenMesh/Tools/Utils/conio.cc index 08c30c0e..be973f77 100644 --- a/src/OpenMesh/Tools/Utils/conio.cc +++ b/src/OpenMesh/Tools/Utils/conio.cc @@ -42,8 +42,23 @@ #include #include +// ----------------------------------------------------------------- MSVC Compiler ---- +#ifdef _MSC_VER + +#include + +namespace OpenMesh { +namespace Utils { + +int kbhit() { return ::_kbhit(); } +int getch() { return ::_getch(); } +int getche() { return ::_getche(); } + +} // Tools +} // AS + // ----------------------------------------------------------------- Win32 ---- -#ifdef WIN32 +#elif defined(WIN32) #include