<commit_before>##
## Author(s):
##  - <NAME>      <<EMAIL>>
##  - <NAME>       <<EMAIL>>
##
## Copyright (C) 2009, 2010, 2011, 2012 Aldebaran Robotics
##

cmake_minimum_required(VERSION 2.6.4)
project(libqimessaging)

enable_testing()

qi_add_optional_package(PYTHON)
set(WITH_PYTHON OFF)
option(WITH_EXAMPLES "Examples"          ON)
option(WITH_PERF     "Performances test" ON)

qi_add_optional_package(QISSH)

if (WIN32)
  add_definitions(" -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DWIN32_LEAN_AND_MEAN")
endif()

if (UNIX)
 add_definitions(" -fno-strict-aliasing ")
endif()

if (EFFECTIVE_CPP)
  add_definitions(" -Weffc++ ")
endif()

# Because CMake automatically qi_EXPORTS, we can do:
if (UNIX OR MINGW)
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
endif()

qi_create_config_h(CONFIG_H "qimessaging/config.hpp.in" "qimessaging/config.hpp")

include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/c)

qi_submodule_create("qi-messaging" ${CONFIG_H}
                                   qimessaging/api.hpp
                                   qimessaging/buffer.hpp
                                   qimessaging/config.hpp.in
                                   qimessaging/datastream.hpp
                                   qimessaging/functor.hpp
                                   qimessaging/gateway.hpp
                                   qimessaging/iodevice.hpp
                                   qimessaging/message.hpp
                                   qimessaging/object.hpp
                                   qimessaging/object.hxx
                                   qimessaging/server.hpp
                                   qimessaging/service_directory.hpp
                                   qimessaging/service_info.hpp
                                   qimessaging/session.hpp
                                   qimessaging/signature.hpp
                                   qimessaging/transport_server.hpp
                                   qimessaging/transport_socket.hpp
                                   qimessaging/value.hpp
                                   qimessaging/url.hpp
                                   qimessaging/future.hpp
                                   qimessaging/details/callfunctor.hpp
                                   qimessaging/details/function_signature.hpp
                                   qimessaging/details/functor.hxx
                                   qimessaging/details/makefunctor.hpp
                                   qimessaging/details/memberfunctor.hxx
                                   qimessaging/details/qt_signature.hpp
                                   qimessaging/details/stl_signature.hpp
                                   qimessaging/details/type_signature.hpp
                                   qimessaging/details/voidfunctor.hxx
                                   qimessaging/details/voidmemberfunctor.hxx

                                   src/buffer.cpp
                                   src/datastream.cpp
                                   src/gateway.cpp
                                   src/message.cpp
                                   src/network_thread.cpp
                                   src/network_thread.hpp
                                   src/object.cpp
                                   src/remoteobject.cpp
                                   src/remoteobject_p.hpp
                                   src/server.cpp
                                   src/service_directory.cpp
                                   src/service_info.cpp
                                   src/session.cpp
                                   src/session_p.hpp
                                   src/signature_convertor.cpp
                                   src/signature_convertor.hpp
                                   src/signature_iterator.cpp
                                   src/transport_server.cpp
                                   src/transport_server_p.hpp
                                   src/transport_socket.cpp
                                   src/value.cpp
                                   src/url.cpp
                                   src/future.cpp)


add_subdirectory(c)

qi_create_lib(qimessaging SUBMODULE qi-messaging qi-messaging-c
                 #qi-cbinding
                 DEPENDS QI BOOST BOOST_DATE_TIME BOOST_THREAD TINYXML LIBEVENT UUID)
if(WIN32)
  qi_use_lib(qimessaging WSA)
endif()

if(UNIX AND NOT APPLE)
  qi_use_lib(rt)
endif()

qi_stage_lib(qimessaging)

#add_subdirectory(test)
qi_add_subdirectory(examples WITH_EXAMPLES)
qi_add_subdirectory(perfs     WITH_PERF)
#add_subdirectory(bin)
#qi_gen_doc(DOXYFILES "Doxyfile")


message(STATUS "")
message(STATUS "Build Options:")
message(STATUS "WITH_EXAMPLES: ${WITH_EXAMPLES}")
message(STATUS "WITH_PERF    : ${WITH_PERF}")
message(STATUS "WITH_PYTHON  : ${WITH_PYTHON}")


add_subdirectory("qt")
add_subdirectory("bin")
if(WITH_PYTHON)
  add_subdirectory("python")
endif()
add_subdirectory("tests")<commit_msg>Revert "Add -lrt for Linux."<commit_after>##
## Author(s):
##  - <NAME>      <<EMAIL>>
##  - <NAME>       <<EMAIL>>
##
## Copyright (C) 2009, 2010, 2011, 2012 Aldebaran Robotics
##

cmake_minimum_required(VERSION 2.6.4)
project(libqimessaging)

enable_testing()

qi_add_optional_package(PYTHON)
set(WITH_PYTHON OFF)
option(WITH_EXAMPLES "Examples"          ON)
option(WITH_PERF     "Performances test" ON)

qi_add_optional_package(QISSH)

if (WIN32)
  add_definitions(" -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DWIN32_LEAN_AND_MEAN")
endif()

if (UNIX)
 add_definitions(" -fno-strict-aliasing ")
endif()

if (EFFECTIVE_CPP)
  add_definitions(" -Weffc++ ")
endif()

# Because CMake automatically qi_EXPORTS, we can do:
if (UNIX OR MINGW)
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
endif()

qi_create_config_h(CONFIG_H "qimessaging/config.hpp.in" "qimessaging/config.hpp")

include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/c)

qi_submodule_create("qi-messaging" ${CONFIG_H}
                                   qimessaging/api.hpp
                                   qimessaging/buffer.hpp
                                   qimessaging/config.hpp.in
                                   qimessaging/datastream.hpp
                                   qimessaging/functor.hpp
                                   qimessaging/gateway.hpp
                                   qimessaging/iodevice.hpp
                                   qimessaging/message.hpp
                                   qimessaging/object.hpp
                                   qimessaging/object.hxx
                                   qimessaging/server.hpp
                                   qimessaging/service_directory.hpp
                                   qimessaging/service_info.hpp
                                   qimessaging/session.hpp
                                   qimessaging/signature.hpp
                                   qimessaging/transport_server.hpp
                                   qimessaging/transport_socket.hpp
                                   qimessaging/value.hpp
                                   qimessaging/url.hpp
                                   qimessaging/future.hpp
                                   qimessaging/details/callfunctor.hpp
                                   qimessaging/details/function_signature.hpp
                                   qimessaging/details/functor.hxx
                                   qimessaging/details/makefunctor.hpp
                                   qimessaging/details/memberfunctor.hxx
                                   qimessaging/details/qt_signature.hpp
                                   qimessaging/details/stl_signature.hpp
                                   qimessaging/details/type_signature.hpp
                                   qimessaging/details/voidfunctor.hxx
                                   qimessaging/details/voidmemberfunctor.hxx

                                   src/buffer.cpp
                                   src/datastream.cpp
                                   src/gateway.cpp
                                   src/message.cpp
                                   src/network_thread.cpp
                                   src/network_thread.hpp
                                   src/object.cpp
                                   src/remoteobject.cpp
                                   src/remoteobject_p.hpp
                                   src/server.cpp
                                   src/service_directory.cpp
                                   src/service_info.cpp
                                   src/session.cpp
                                   src/session_p.hpp
                                   src/signature_convertor.cpp
                                   src/signature_convertor.hpp
                                   src/signature_iterator.cpp
                                   src/transport_server.cpp
                                   src/transport_server_p.hpp
                                   src/transport_socket.cpp
                                   src/value.cpp
                                   src/url.cpp
                                   src/future.cpp)


add_subdirectory(c)

qi_create_lib(qimessaging SUBMODULE qi-messaging qi-messaging-c
                 #qi-cbinding
                 DEPENDS QI BOOST BOOST_DATE_TIME BOOST_THREAD TINYXML LIBEVENT UUID)
if(WIN32)
  qi_use_lib(qimessaging WSA)
endif(WIN32)

qi_stage_lib(qimessaging)

#add_subdirectory(test)
qi_add_subdirectory(examples WITH_EXAMPLES)
qi_add_subdirectory(perfs     WITH_PERF)
#add_subdirectory(bin)
#qi_gen_doc(DOXYFILES "Doxyfile")


message(STATUS "")
message(STATUS "Build Options:")
message(STATUS "WITH_EXAMPLES: ${WITH_EXAMPLES}")
message(STATUS "WITH_PERF    : ${WITH_PERF}")
message(STATUS "WITH_PYTHON  : ${WITH_PYTHON}")


add_subdirectory("qt")
add_subdirectory("bin")
if(WITH_PYTHON)
  add_subdirectory("python")
endif()
add_subdirectory("tests")
{'fraction_non_alphanumeric': 0.06966050288621466, 'fraction_numerical': 0.005087564817532531, 'mean_word_length': 1.2328527741371778, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 106, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5423442', 'n_tokens_mistral': 2925, 'n_tokens_neox': 2715, 'n_words': 349}