Skip to content

Commit

Permalink
-Set signaler_port to 0 which allows the OS to find a free port, rath…
Browse files Browse the repository at this point in the history
…er than crashing if 5905 is in use (#1542)

-Added config.hpp to the source list so it shows up in generated projects
-Remove CMAKE_BUILD_TYPE setting for generators that don't use it
  • Loading branch information
mattbolgercsiro committed Aug 21, 2015
1 parent ec98916 commit 7e09306
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,9 @@ endif()
#-----------------------------------------------------------------------------
# default to Release build

if(NOT CMAKE_BUILD_TYPE)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
# CMAKE_BUILD_TYPE is not used for multi-configuration generators like Visual Studio/XCode
# which instead use CMAKE_CONFIGURATION_TYPES
set(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
Expand Down Expand Up @@ -436,7 +438,8 @@ set(cxx-sources
xsub.cpp
zmq.cpp
zmq_utils.cpp
decoder_allocators.cpp)
decoder_allocators.cpp
config.hpp)

set(rc-sources version.rc)

Expand Down
6 changes: 5 additions & 1 deletion src/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ namespace zmq

// On some OSes the signaler has to be emulated using a TCP
// connection. In such cases following port is used.
signaler_port = 5905
// If 0, it lets the OS choose a free port without requiring use of a
// global mutex. The original implementation of a Windows signaler
// socket used port 5905 instead of letting the OS choose a free port.
// https://github.com/zeromq/libzmq/issues/1542
signaler_port = 0
};

}
Expand Down

0 comments on commit 7e09306

Please sign in to comment.