Fix bugs in metis re building on Windows. Mostly version issues were new c math functions were redefined poorly in gklib and metis.

release/4.3a0
Andrew Melim 2014-09-18 10:45:01 -04:00
parent f9f6fadba4
commit 3046d52d6e
2 changed files with 5 additions and 2 deletions

View File

@ -9,7 +9,9 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
endif() endif()
endif() endif()
add_definitions(-Wno-unknown-pragmas) if(NOT ("${CMAKE_C_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"))
#add_definitions(-Wno-unknown-pragmas)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.6) if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.6)

View File

@ -59,9 +59,10 @@ typedef ptrdiff_t ssize_t;
#endif #endif
#ifdef __MSC__ #ifdef __MSC__
#if(_MSC_VER < 1700)
/* MSC does not have rint() function */ /* MSC does not have rint() function */
#define rint(x) ((int)((x)+0.5)) #define rint(x) ((int)((x)+0.5))
#endif
/* MSC does not have INFINITY defined */ /* MSC does not have INFINITY defined */
#ifndef INFINITY #ifndef INFINITY
#define INFINITY FLT_MAX #define INFINITY FLT_MAX