Browse Source

fix the 'sleep_for' missing error on linux platform

pull/168/head
guanqun 10 years ago
parent
commit
eddb5fa91e
  1. 2
      build/CMakeLists.txt

2
build/CMakeLists.txt

@ -103,6 +103,8 @@ endif ()
# compiler flags customization (by system) # compiler flags customization (by system)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux") if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
list (APPEND DAEMON_SRC "${CMAKE_SOURCE_DIR}/DaemonLinux.cpp") list (APPEND DAEMON_SRC "${CMAKE_SOURCE_DIR}/DaemonLinux.cpp")
# "'sleep_for' is not a member of 'std::this_thread'" in gcc 4.7/4.8
add_definitions( "-D_GLIBCXX_USE_NANOSLEEP=1" )
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
list (APPEND DAEMON_SRC "${CMAKE_SOURCE_DIR}/DaemonLinux.cpp") list (APPEND DAEMON_SRC "${CMAKE_SOURCE_DIR}/DaemonLinux.cpp")
# "'sleep_for' is not a member of 'std::this_thread'" in gcc 4.7/4.8 # "'sleep_for' is not a member of 'std::this_thread'" in gcc 4.7/4.8

Loading…
Cancel
Save