Skip to content
Snippets Groups Projects
Commit 4e1b9f29 authored by Soeren Peters's avatar Soeren Peters
Browse files

Fix Cygwin define usage. Add NOMINMAX definition to the top level cmake.

parent fc75c7dd
No related branches found
No related tags found
No related merge requests found
......@@ -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)
#################################################################################
......
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})
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment