You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use an old system with cmake 2.8.7 (not support TARGET_OBJECTS) and gcc 4.6.3 (not support -std=c++11) so the build does not work. The following patch helps me build successfully.
Hope that helps.
diff --git a/C++/CMakeLists.txt b/C++/CMakeLists.txt
index 36121c5..d05f845 100644
--- a/C++/CMakeLists.txt
+++ b/C++/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.8)
-SET(CMAKE_CXX_FLAGS "-std=c++11") # -DVERBOSE")
+SET(CMAKE_CXX_FLAGS "-std=c++0x") # -DVERBOSE")
ADD_DEFINITIONS("-DMIXED")
diff --git a/C/CMakeLists.txt b/C/CMakeLists.txt
index 881c5c2..7d7b17d 100644
--- a/C/CMakeLists.txt
+++ b/C/CMakeLists.txt
@@ -7,10 +7,12 @@ SET(libsocket_src
IF ( NOT IS_SUNOS )
ADD_DEFINITIONS(-fPIC) # for the static library which needs to be linked into the shared libsocket++.so object.
- ADD_LIBRARY(socket_o OBJECT ${libsocket_src})
+ #ADD_LIBRARY(socket_o OBJECT ${libsocket_src})
- ADD_LIBRARY(socket MODULE $<TARGET_OBJECTS:socket_o>)
- ADD_LIBRARY(socket_int STATIC $<TARGET_OBJECTS:socket_o>)
+ #ADD_LIBRARY(socket MODULE $<TARGET_OBJECTS:socket_o>)
+ #ADD_LIBRARY(socket_int STATIC $<TARGET_OBJECTS:socket_o>)
+ ADD_LIBRARY(socket MODULE ${libsocket_src})
+ ADD_LIBRARY(socket_int STATIC ${libsocket_src})
INSTALL(TARGETS socket DESTINATION ${LIB_DIR})
ELSE() # On SunOS (e.g. OpenIndiana) we have to link against the system's libsocket. The library is renamed to libsocket_hl (hl = high-level)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5233618..0def475 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,7 @@ CONFIGURE_FILE(headers/conf.h.in ${CMAKE_SOURCE_DIR}/headers/conf.h)
# Compiler configuration
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/headers/)
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
ADD_DEFINITIONS(-Wall -Wextra)
#ADD_DEFINITIONS(-DVERBOSE)
The text was updated successfully, but these errors were encountered:
Thanks for the patch! However, the documentation makes it clear that a compiler supporting C++11 (i.e. not C++0x) and CMake >= 2.8.8 are required.
Adding the patch as a separate file and referencing it from the README as an easy way to gain compatibility for older systems would be very nice, though!
I use an old system with cmake 2.8.7 (not support TARGET_OBJECTS) and gcc 4.6.3 (not support -std=c++11) so the build does not work. The following patch helps me build successfully.
Hope that helps.
The text was updated successfully, but these errors were encountered: