| | |
| | | |
| | | target_link_libraries(shm_queue PUBLIC ${EXTRA_LIBS} ) |
| | | |
| | | |
| | | if (BUILD_SHARED_LIBS) |
| | | add_custom_command( |
| | | OUTPUT ${PROJECT_BINARY_DIR}/lib/libshm_queue.so.md5 |
| | | COMMAND md5sum ${PROJECT_BINARY_DIR}/lib/libshm_queue.so > ${PROJECT_BINARY_DIR}/lib/libshm_queue.so.md5 |
| | | DEPENDS ${PROJECT_BINARY_DIR}/lib/libshm_queue.so |
| | | COMMENT "Generate libshm_queue.so.md5" |
| | | VERBATIM |
| | | ) |
| | | |
| | | add_custom_target("genmd5" ALL DEPENDS ${PROJECT_BINARY_DIR}/lib/libshm_queue.so.md5) |
| | | endif() |
| | | |
| | | # install rules |
| | | install(TARGETS shm_queue DESTINATION lib) |
| | | install(FILES |
| | |
| | | const int send_size, const int key, void **recv_buf, |
| | | int *recv_size, const struct timespec *timeout, int flags) { |
| | | |
| | | int rv, tryn = 6; |
| | | int rv, tryn = 16; |
| | | shm_packet_t sendpak; |
| | | shm_packet_t recvpak; |
| | | std::map<std::string, shm_packet_t>::iterator recvbufIter; |
| | |
| | | { |
| | | |
| | | printf("===%d, %d \n", sizeof(cm_con_data_t), sizeof(cm_con_data2_t)); |
| | | |
| | | |
| | | /* SIGQUIT here will terminate with core file */ |
| | | } |
| | | |
| | |
| | | OUTPUT ${PROJECT_BINARY_DIR}/bin/net_mod_socket.sh |
| | | COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/net_mod_socket.sh ${PROJECT_BINARY_DIR}/bin/net_mod_socket.sh |
| | | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/net_mod_socket.sh |
| | | VERBATIM |
| | | ) |
| | | |
| | | add_custom_target("net_mod_socket.sh" ALL DEPENDS ${PROJECT_BINARY_DIR}/bin/net_mod_socket.sh) |
| | | |
| | | |
| | | # add the executable |
| | | add_executable(shm_util shm_util.cpp ${PROJECT_BINARY_DIR}/bin/net_mod_socket.sh) |
| | | add_executable(shm_util shm_util.cpp ) |
| | | target_link_libraries(shm_util PRIVATE shm_queue ${EXTRA_LIBS} ) |
| | | target_include_directories(shm_util PRIVATE |
| | | "${PROJECT_BINARY_DIR}" |