Browse Source

vs2015 fixes in cmake file
fixed bug in DMAT on windows


Former-commit-id: 206a896e17e0f8b0e4aeadacd201ee2d49a99096

Daniele Panozzo 9 years ago
parent
commit
9cdd504b3c
2 changed files with 3 additions and 2 deletions
  1. 2 1
      include/igl/readDMAT.cpp
  2. 1 1
      tutorial/CMakeLists.txt

+ 2 - 1
include/igl/readDMAT.cpp

@@ -45,7 +45,8 @@ static inline int readDMAT_read_header(FILE * fp, int & num_rows, int & num_cols
   }
   // finish reading header
   char lf;
-  if(fread(&lf, sizeof(char), 1, fp)!=1 || lf != '\n')
+
+  if(fread(&lf, sizeof(char), 1, fp)!=1 || !(lf == '\n' || lf == '\r'))
   {
     fprintf(stderr,"IOError: bad line ending in header\n");
     return 4;

+ 1 - 1
tutorial/CMakeLists.txt

@@ -12,7 +12,7 @@ endif(LIBIGL_USE_STATIC_LIBRARY)
 SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
 
 IF(MSVC)
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") ### Enable parallel compilation for Visual Studio
+  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /bigobj") ### Enable parallel compilation for Visual Studio
   SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR} )
   SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR} )
 ELSE(MSVC)