From 595e6c57df41b8170c5389a654f5d10b9722b3b3 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Fri, 17 Jul 2020 11:33:02 -0700 Subject: [PATCH] IXSelectInterruptPipe.h included in cmake on windows but compiled out --- CMakeLists.txt | 8 ++------ ixwebsocket/IXSelectInterruptPipe.cpp | 6 +++++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 446ea507..a55070c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,7 @@ set( IXWEBSOCKET_SOURCES ixwebsocket/IXNetSystem.cpp ixwebsocket/IXSelectInterrupt.cpp ixwebsocket/IXSelectInterruptFactory.cpp + ixwebsocket/IXSelectInterruptPipe.cpp ixwebsocket/IXSocket.cpp ixwebsocket/IXSocketConnect.cpp ixwebsocket/IXSocketFactory.cpp @@ -69,6 +70,7 @@ set( IXWEBSOCKET_HEADERS ixwebsocket/IXProgressCallback.h ixwebsocket/IXSelectInterrupt.h ixwebsocket/IXSelectInterruptFactory.h + ixwebsocket/IXSelectInterruptPipe.h ixwebsocket/IXSetThreadName.h ixwebsocket/IXSocket.h ixwebsocket/IXSocketConnect.h @@ -99,12 +101,6 @@ set( IXWEBSOCKET_HEADERS ixwebsocket/IXWebSocketVersion.h ) -if (UNIX) - # Linux, Mac, iOS, Android - list( APPEND IXWEBSOCKET_SOURCES ixwebsocket/IXSelectInterruptPipe.cpp ) - list( APPEND IXWEBSOCKET_SOURCES ixwebsocket/IXSelectInterruptPipe.h ) -endif() - # Platform specific code if (APPLE) list( APPEND IXWEBSOCKET_SOURCES ixwebsocket/apple/IXSetThreadName_apple.cpp) diff --git a/ixwebsocket/IXSelectInterruptPipe.cpp b/ixwebsocket/IXSelectInterruptPipe.cpp index 6cf53d19..a1734638 100644 --- a/ixwebsocket/IXSelectInterruptPipe.cpp +++ b/ixwebsocket/IXSelectInterruptPipe.cpp @@ -5,8 +5,10 @@ */ // -// On macOS we use UNIX pipes to wake up select. +// On UNIX we use pipes to wake up select. There is no way to do that +// on Windows so this file is compiled out on Windows. // +#ifndef _WIN32 #include "IXSelectInterruptPipe.h" @@ -144,3 +146,5 @@ namespace ix return _fildes[kPipeReadIndex]; } } // namespace ix + +#endif // !_WIN32