diff --git a/CMakeLists.txt b/CMakeLists.txt index f031956ba8df35bb980a2971c3514f1d19b7809d..331e7fe3a5b2228dc86faafdb439bf0f4bece54d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,9 @@ include("${CMAKE_PATH}/VirtualFluidsMacros.cmake") ################################################################################# # COMMON LIBRARIES ################################################################################# +if(MSVC) + ADD_DEFINITIONS ( "-DNOMINMAX" ) # Disable Min/Max-Macros +endif() add_subdirectory(src/basics) ################################################################################# diff --git a/cpu.cmake b/cpu.cmake index f04d9eb06308adbe6323067b60997b9c6a42d6f5..30b3254457c56120fb90ad150dbb3a88fa60b4af 100644 --- a/cpu.cmake +++ b/cpu.cmake @@ -1,7 +1,7 @@ SET(USE_INTEL OFF CACHE BOOL "include Intel compiler support") -SET(USE_GCC ON CACHE BOOL "include gcc compiler support") +SET(USE_GCC OFF CACHE BOOL "include gcc compiler support") set (SOURCE_DIR ${PROJECT_SOURCE_DIR}) diff --git a/src/basics/basics/utilities/UbSystem.h b/src/basics/basics/utilities/UbSystem.h index 2102bc52acffb4f7e94263a070c86fe3f55f563c..f726f841fc833e426cb558bdfcd42f2766e042c7 100644 --- a/src/basics/basics/utilities/UbSystem.h +++ b/src/basics/basics/utilities/UbSystem.h @@ -72,7 +72,7 @@ #define UBSYSTEM_CYGWIN #include <windows.h> #else - #include <sys/syscall.h> + //#include <sys/syscall.h> // TODO: Did not work on windows! #endif #if defined(min) || defined(max) //daruch kann man sich spaeter #undef min; #undef max erparen @@ -134,7 +134,7 @@ namespace UbSystem /*==========================================================*/ inline void sleepS(const unsigned int& sec) { - #if defined(UBSYSTEM_WINDOWS) && defined(UBSYSTEM_CYGWIN) + #if defined(UBSYSTEM_WINDOWS) || defined(UBSYSTEM_CYGWIN) ::Sleep( (sec==0) ? 1 : sec*1000 ); // +1 here causes a context switch if sleepS(0) is called #elif defined(UBSYSTEM_LINUX) || defined(UBSYSTEM_APPLE) || defined(UBSYSTEM_AIX) && !defined(UBSYSTEM_CYGWIN) ::sleep(sec); @@ -459,7 +459,7 @@ namespace UbSystem char Name[150]; int i = 0; -#if defined(UBSYSTEM_WINDOWS) && defined(UBSYSTEM_CYGWIN) +#if defined(UBSYSTEM_WINDOWS) || defined(UBSYSTEM_CYGWIN) TCHAR infoBuf[150]; DWORD bufCharCount = 150; memset(Name, 0, 150);