File tree Expand file tree Collapse file tree 4 files changed +15
-7
lines changed Expand file tree Collapse file tree 4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ if(USE_OpenMP)
2929 endif ()
3030endif ()
3131
32- if (WIN32 )
32+ if (MSVC )
3333 set (CMAKE_USE_RELATIVE_PATHS "1" )
3434 # Set compiler flags
3535 set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MP /bigobj" )
@@ -38,15 +38,18 @@ if (WIN32)
3838 set (CMAKE_EXE_LINKER_FLAGS_RELEASE "/INCREMENTAL:NO" )
3939 set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "/INCREMENTAL:NO" )
4040 set (CMAKE_STATIC_LINKER_FLAGS_RELEASE "/INCREMENTAL:NO" )
41- endif (WIN32 )
41+ endif (MSVC )
4242
43- if (UNIX )
43+ if (UNIX OR MINGW )
4444 set (CMAKE_USE_RELATIVE_PATHS "1" )
4545 set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG" )
4646 # Set compiler flags for "release"
4747 set (CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -march=native" )
4848 set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -DNDEBUG -march=native" )
49- endif (UNIX )
49+ endif (UNIX OR MINGW)
50+ if (MINGW)
51+ set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O1 -Wa,-mbig-obj" )
52+ endif (MINGW)
5053
5154if (APPLE )
5255 set (CMAKE_MACOSX_RPATH 1)
Original file line number Diff line number Diff line change 1313#include < unistd.h>
1414#endif
1515
16+ #if (defined(__MINGW32__) || defined(__MINGW64__))
17+ #include < sys/stat.h>
18+ #endif
19+
20+
1621namespace Utilities
1722{
1823 /* * \brief This class implements different file system functions.
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ IndexedFaceMesh& IndexedFaceMesh::operator=(IndexedFaceMesh const& other)
1818 for (size_t i (0u ); i < m_faces.size (); ++i)
1919 {
2020 m_faces[i].m_edges = new unsigned int [m_verticesPerFace];
21- #if defined(WIN32) || defined(_WIN32) || defined(WIN64)
21+ #if defined(_MSC_VER)
2222 std::copy (other.m_faces [i].m_edges , other.m_faces [i].m_edges + m_verticesPerFace,
2323 stdext::unchecked_array_iterator<unsigned int *>(m_faces[i].m_edges ));
2424#else
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ namespace Utilities
3939 {
4040 m_numFaces = other.m_numFaces ;
4141 m_fIndices = new unsigned int [m_numFaces];
42- #if defined(WIN32) || defined(_WIN32) || defined(WIN64)
42+ #if defined(_MSC_VER)
4343 std::copy (other.m_fIndices , other.m_fIndices + m_numFaces,
4444 stdext::unchecked_array_iterator<unsigned int *>(m_fIndices));
4545#else
@@ -75,7 +75,7 @@ namespace Utilities
7575 {
7676 m_numEdges = other.m_numEdges ;
7777 m_eIndices = new unsigned int [m_numEdges];
78- #if defined(WIN32) || defined(_WIN32) || defined(WIN64)
78+ #if defined(_MSC_VER)
7979 std::copy (other.m_eIndices , other.m_eIndices + m_numEdges,
8080 stdext::unchecked_array_iterator<unsigned int *>(m_eIndices));
8181#else
You can’t perform that action at this time.
0 commit comments