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