mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 11:44:53 +08:00
Fix up linking on Linux for the tests
Conflicts: CMakeLists.txt tests/serial_tests.cc
This commit is contained in:
parent
e1138fda9e
commit
3292f2b682
@ -58,5 +58,10 @@ install(FILES include/serial/serial.h include/serial/v8stdint.h
|
|||||||
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}/serial)
|
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}/serial)
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
catkin_add_gtest(${PROJECT_NAME}-test tests/serial_tests.cc)
|
if(CATKIN_ENABLE_TESTING)
|
||||||
target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
|
catkin_add_gtest(${PROJECT_NAME}-test tests/serial_tests.cc)
|
||||||
|
target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME} ${Boost_LIBRARIES})
|
||||||
|
if(UNIX AND NOT APPLE)
|
||||||
|
target_link_libraries(${PROJECT_NAME}-test util)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|||||||
@ -29,7 +29,7 @@ void loop()
|
|||||||
|
|
||||||
#include "serial/serial.h"
|
#include "serial/serial.h"
|
||||||
|
|
||||||
#ifdef __linux__
|
#if defined(__linux__)
|
||||||
#include <pty.h>
|
#include <pty.h>
|
||||||
#else
|
#else
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user