I am trying to compile the Boost ASIO examples using CMake on Ubuntu 13.04 with GCC 4.73.
With the following CMake File:
cmake_minimum_required(VERSION 2.8)
ADD_DEFINITIONS(-std=c++11)
project(server)
find_package( Boost 1.53.0 REQUIRED system)
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
add_executable( server server.cpp )
target_link_libraries(server ${Boost_LIBRARIES} )
add_executable( client client.cpp )
target_link_libraries(client ${Boost_LIBRARIES})
The project should be using C++11 and be platform independent. When compiling using the CMakefile I get something like
undefined reference to `pthread_join'
My colleague can compile exactly the same Makefile without any problems.
The question: Is there any way to force CMake or Boost not to use PThreads but the C++11 Threads to stay platform independent?
EDIT: The server compiles without problems while only the client has problems.