File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ PROJECT(sioclient
77option (BUILD_SHARED_LIBS "Build the shared library" OFF )
88option (BUILD_UNIT_TESTS "Builds unit tests target" OFF )
99option (USE_SUBMODULES "Use source in local submodules instead of system libraries" ON )
10+ option (DISABLE_LOGGING "Do not print logging messages" OFF )
1011
1112if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES )
1213 set (DEFAULT_BUILD_TYPE "Release" )
@@ -39,6 +40,10 @@ add_definitions(
3940 -D_WEBSOCKETPP_CPP11_CHRONO_
4041)
4142
43+ if (DISABLE_LOGGING)
44+ add_definitions (-DSIO_DISABLE_LOGGING)
45+ endif ()
46+
4247set (ALL_SRC
4348 "src/sio_client.cpp"
4449 "src/sio_socket.cpp"
Original file line number Diff line number Diff line change 1313#include < mutex>
1414#include < cmath>
1515// Comment this out to disable handshake logging to stdout
16- #if DEBUG || _DEBUG
16+ #if ( DEBUG || _DEBUG) && !defined(SIO_DISABLE_LOGGING)
1717#define LOG (x ) std::cout << x
1818#else
1919#define LOG (x )
You can’t perform that action at this time.
0 commit comments