1
0
mirror of https://github.com/wjwwood/serial.git synced 2026-01-23 04:04:54 +08:00

Updating ROS make system.

This commit is contained in:
William Woodall 2012-01-13 11:40:59 -06:00
parent f81268fdf0
commit 760784e730
2 changed files with 16 additions and 7 deletions

View File

@ -209,7 +209,7 @@ class SerialListenerException : public std::exception {
const std::string e_what_;
public:
SerialListenerException(const std::string e_what) : e_what_(e_what) {}
~SerialListenerException() throw() {std::exception::~exception();}
~SerialListenerException() throw() {}
virtual const char* what() const throw() {
std::stringstream ss;

View File

@ -17,20 +17,29 @@ set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
# Check for OS X and if so disable kqueue support in asio
IF(CMAKE_SYSTEM_NAME MATCHES Darwin)
add_definitions(-DBOOST_ASIO_DISABLE_KQUEUE)
ENDIF(CMAKE_SYSTEM_NAME MATCHES Darwin)
include_directories(include)
set(SERIAL_SRCS src/serial.cc)
if(UNIX)
list(APPEND SERIAL_SRCS src/impl/unix.cc)
else(UNIX)
list(APPEND SERIAL_SRCS src/impl/windows.cc)
endif(UNIX)
list(APPEND SERIAL_SRCS src/serial_listener.cc)
# Build the serial library
rosbuild_add_library(${PROJECT_NAME} src/serial.cpp include/serial/serial.h)
rosbuild_add_library(${PROJECT_NAME} ${SERIAL_SRCS})
# Add boost dependencies
rosbuild_add_boost_directories()
rosbuild_link_boost(${PROJECT_NAME} system filesystem thread)
# Build example
rosbuild_add_executable(serial_example examples/serial_example.cpp)
rosbuild_add_executable(serial_example examples/serial_example.cc)
target_link_libraries(serial_example ${PROJECT_NAME})
rosbuild_add_executable(serial_listener_example
examples/serial_listener_example.cc)
target_link_libraries(serial_listener_example ${PROJECT_NAME})
endmacro(build_serial)