From c2354ea4f2d7b1c3adcbf120324efeac44cf9b2f Mon Sep 17 00:00:00 2001 From: diwlevin Date: Sun, 8 Apr 2018 17:57:11 -0400 Subject: [PATCH] Fix Windows Build --- CMakeLists.txt | 1 + ThirdParty/fcl | 2 +- ThirdParty/libccd | 2 +- ThirdParty/libigl | 2 +- src/Core/cpp/CoreOSSpecific.cpp | 2 +- src/Core/include/CoreDefines.h | 4 ++-- src/Core/include/CoreOSSpecific.h | 2 +- src/Core/include/Utilities.h | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c15bd3a..ac3470b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,7 @@ else() if(WIN32) set (CMAKE_C_FLAGS /openmp ${CMAKE_C_FLAGS}) set (CMAKE_CXX_FLAGS /openmp ${CMAKE_CXX_FLAGS}) + add_definitions(-DWIN32) ELSE() set (CMAKE_C_FLAGS ${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}) set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}) diff --git a/ThirdParty/fcl b/ThirdParty/fcl index fe703ff..2b0f911 160000 --- a/ThirdParty/fcl +++ b/ThirdParty/fcl @@ -1 +1 @@ -Subproject commit fe703ff419f3bdb896d357e00686a95d6d0a4bc4 +Subproject commit 2b0f911841d7c116c8ac076b50b1992eb3dab22a diff --git a/ThirdParty/libccd b/ThirdParty/libccd index 5677d38..63d3a91 160000 --- a/ThirdParty/libccd +++ b/ThirdParty/libccd @@ -1 +1 @@ -Subproject commit 5677d384315d64c41a9e1dabe6a531f10ffbb7fb +Subproject commit 63d3a911f016465a2ecf169d0c8bff8b601f1715 diff --git a/ThirdParty/libigl b/ThirdParty/libigl index f239034..3123b96 160000 --- a/ThirdParty/libigl +++ b/ThirdParty/libigl @@ -1 +1 @@ -Subproject commit f239034d5eb0790ee7639b2523367a71e298fd21 +Subproject commit 3123b967c1e2cd8e9233937396c5736f2274b5e0 diff --git a/src/Core/cpp/CoreOSSpecific.cpp b/src/Core/cpp/CoreOSSpecific.cpp index 05b5a1e..c150f12 100644 --- a/src/Core/cpp/CoreOSSpecific.cpp +++ b/src/Core/cpp/CoreOSSpecific.cpp @@ -7,7 +7,7 @@ #include #endif -#ifdef WIN32 +#if defined(_WIN32) || defined(_WIN64) || defined (WIN32) int Core::getDirectoryListing(std::vector &list, const std::string &directoryName) { diff --git a/src/Core/include/CoreDefines.h b/src/Core/include/CoreDefines.h index 7320a7a..2ace463 100644 --- a/src/Core/include/CoreDefines.h +++ b/src/Core/include/CoreDefines.h @@ -11,13 +11,13 @@ #include #include -#ifdef WIN32 +#if defined(_WIN32) || defined(_WIN64) || defined (WIN32) #define MEMCPY(dst, size, src, num) (memcpy_s((dst), (size), (src), (num))) #else #define MEMCPY(dst, size, src, num) (memcpy((dst), (src), (num))) #endif -#ifdef WIN32 +#if defined(_WIN32) || defined(_WIN64) || defined (WIN32) #define MEMSET #else #define MEMSET(dst, val, num) (memset((dst), (val), (num))) diff --git a/src/Core/include/CoreOSSpecific.h b/src/Core/include/CoreOSSpecific.h index c872f6f..74d430d 100644 --- a/src/Core/include/CoreOSSpecific.h +++ b/src/Core/include/CoreOSSpecific.h @@ -8,7 +8,7 @@ #include #include -#ifdef WIN32 +#if defined(WIN32) || defined(_WIN32) || defined(_WIN64) #define PATH_SEPARATOR '\\' #else #define PATH_SEPARATOR '/' diff --git a/src/Core/include/Utilities.h b/src/Core/include/Utilities.h index d3a58bf..df176cb 100644 --- a/src/Core/include/Utilities.h +++ b/src/Core/include/Utilities.h @@ -134,7 +134,7 @@ namespace Gauss { }; //Direct access into a tuple to run a designated function - #ifdef _WIN32 + #if defined(_WIN32) || defined(_WIN64) || defined (WIN32) //Slow version that doesn't break Visual Studio Compiler template class ApplyTuple {