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

Removing old build files.

This commit is contained in:
William Woodall 2012-10-23 23:46:57 -07:00
parent 5a2f127d26
commit 73371a144d
8 changed files with 0 additions and 320 deletions

View File

@ -1,19 +0,0 @@
find_path(serial_INCLUDE_DIRS serial/serial.h /usr/include
/usr/local/include "$ENV{NAMER_ROOT}")
find_library(serial_LIBRARIES serial /usr/lib /usr/local/lib
"$ENV{NAMER_ROOT}")
set(serial_FOUND TRUE)
if (NOT serial_INCLUDE_DIRS)
set(serial_FOUND FALSE)
endif (NOT serial_INCLUDE_DIRS)
if (NOT serial_LIBRARIES)
set(serial_FOUND FALSE)
else (NOT serial_LIBRARIES)
if ("${CMAKE_SYSTEM}" MATCHES "Linux")
list(APPEND serial_LIBRARIES rt)
endif ("${CMAKE_SYSTEM}" MATCHES "Linux")
endif (NOT serial_LIBRARIES)

View File

@ -1,26 +0,0 @@
/**
\mainpage
\htmlinclude manifest.html
\b serial is ...
<!--
Provide an overview of your package.
-->
\section codeapi Code API
<!--
Provide links to specific auto-generated API documentation within your
package that is of particular interest to a reader. Doxygen will
document pretty much every part of your code, so do your best here to
point the reader to the actual API.
If your codebase is fairly large or has different sets of APIs, you
should use the doxygen 'group' tag to keep these APIs together. For
example, the roscpp documentation has 'libros' group.
-->
*/

View File

@ -1,19 +0,0 @@
<package>
<description brief="serial">
serial
</description>
<author>William Woodall</author>
<license>BSD</license>
<review status="unreviewed" notes=""/>
<url>http://ros.org/wiki/serial</url>
<export>
<cpp cflags="-I${prefix}/include" lflags="-L${prefix}/lib -Wl,-rpath,${prefix}/lib -lserial -lrt -pthread"/>
<cpp os="osx" cflags="-I${prefix}/include" lflags="-L${prefix}/lib -Wl,-rpath,${prefix}/lib -lserial"/>
</export>
</package>

View File

@ -1,159 +0,0 @@
macro(build_serial)
## Project Setup
cmake_minimum_required(VERSION 2.4.6)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
project(Serial)
## Configurations
# Enable warnings
# Assuming unix means a gcc style compiler, eg. g++ or clang++.
IF(UNIX)
#set(CMAKE_CXX_FLAGS "-Wall -Weffc++ -pedantic -pedantic-errors -Wextra -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion -Wdisabled-optimization -Wfloat-equal -Wformat -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimport -Winit-self -Winline -Winvalid-pch -Wlong-long -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstack-protector -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wswitch-enum -Wtrigraphs -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings")
ELSEIF(WIN32)
# Force to always compile with W4
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
endif(UNIX)
IF(NOT DEFINED BUILD_NO_CLANG)
option(BUILD_NO_CLANG "Do not use the Clang compiler." OFF)
ENDIF(NOT DEFINED BUILD_NO_CLANG)
# Use clang if available
IF(EXISTS /usr/bin/clang AND NOT BUILD_NO_CLANG)
set(CMAKE_CXX_COMPILER /usr/bin/clang++)
set(CMAKE_OSX_DEPLOYMENT_TARGET "")
set(SERIAL_BUILD_WARNINGS TRUE)
set(CMAKE_BUILD_TYPE Debug)
ENDIF(EXISTS /usr/bin/clang AND NOT BUILD_NO_CLANG)
option(SERIAL_BUILD_TESTS "Build all of the Serial tests." OFF)
option(SERIAL_BUILD_EXAMPLES "Build all of the Serial examples." OFF)
# Allow for building shared libs override
IF(NOT BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS OFF)
ENDIF(NOT BUILD_SHARED_LIBS)
# Threading libraries added for mutexs
FIND_PACKAGE (Threads)
# Set the default path for built executables to the "bin" directory
IF(NOT DEFINED(EXECUTABLE_OUTPUT_PATH))
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
ENDIF(NOT DEFINED(EXECUTABLE_OUTPUT_PATH))
# set the default path for built libraries to the "lib" directory
IF(NOT DEFINED(LIBRARY_OUTPUT_PATH))
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
ENDIF(NOT DEFINED(LIBRARY_OUTPUT_PATH))
## Configure the build system
# Add the include folder to the include path
include_directories(${PROJECT_SOURCE_DIR}/include)
# Add default source files
set(SERIAL_SRCS src/serial.cc)
IF(WIN32)
list(APPEND SERIAL_SRCS src/impl/win.cc)
ELSE(WIN32)
list(APPEND SERIAL_SRCS src/impl/unix.cc)
ENDIF(WIN32)
# Add default header files
set(SERIAL_HEADERS include/serial/serial.h)
set(OTHER_LIBS "")
if(UNIX)
set(OTHER_LIBS util)
endif(UNIX)
if(UNIX AND NOT APPLE)
list(APPEND OTHER_LIBS rt pthread)
endif(UNIX AND NOT APPLE)
## Build the Serial Library
# Compile the Library
add_library(serial ${SERIAL_SRCS})
target_link_libraries(serial ${CMAKE_THREAD_LIBS_INIT} ${OTHER_LIBS})
## Build Examples
# If asked to
IF(SERIAL_BUILD_EXAMPLES)
# Compile the Serial Test program
add_executable(serial_example examples/serial_example.cc)
# Link the Test program to the Serial library
target_link_libraries(serial_example serial)
ENDIF(SERIAL_BUILD_EXAMPLES)
## Build tests
# If asked to
IF(SERIAL_BUILD_TESTS)
# Find Google Test
enable_testing()
find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})
# Compile the Serial Test program
add_executable(serial_tests tests/serial_tests.cc)
# Link the Test program to the serial library
target_link_libraries(serial_tests ${GTEST_BOTH_LIBRARIES}
serial)
add_test(AllTestsIntest_serial serial_tests)
ENDIF(SERIAL_BUILD_TESTS)
## Setup install and uninstall
# Unless asked not to...
IF(NOT SERIAL_DONT_CONFIGURE_INSTALL)
# Configure make install
IF(NOT CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX /usr/local)
ENDIF(NOT CMAKE_INSTALL_PREFIX)
INSTALL(TARGETS serial
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
INSTALL(FILES include/serial/serial.h
include/serial/v8stdint.h
DESTINATION include/serial)
IF(NOT CMAKE_FIND_INSTALL_PATH)
set(CMAKE_FIND_INSTALL_PATH ${CMAKE_ROOT})
ENDIF(NOT CMAKE_FIND_INSTALL_PATH)
INSTALL(FILES Findserial.cmake
DESTINATION ${CMAKE_FIND_INSTALL_PATH}/Modules/)
ADD_CUSTOM_TARGET(uninstall @echo uninstall package)
IF (UNIX)
ADD_CUSTOM_COMMAND(
COMMENT "uninstall package"
COMMAND xargs ARGS rm < install_manifest.txt
TARGET uninstall
)
ELSE(UNIX)
ADD_CUSTOM_COMMAND(
COMMENT "uninstall only implemented in unix"
TARGET uninstall
)
ENDIF(UNIX)
ENDIF(NOT SERIAL_DONT_CONFIGURE_INSTALL)
endmacro(build_serial)

View File

@ -1,40 +0,0 @@
all: serial
install:
cd build && make install
uninstall:
cd build && make uninstall
serial:
@mkdir -p build
-mkdir -p bin
cd build && cmake $(CMAKE_FLAGS) ..
ifneq ($(MAKE),)
cd build && $(MAKE)
else
cd build && make
endif
clean:
-cd build && make clean
rm -rf build bin lib
.PHONY: doc
doc:
@doxygen doc/Doxyfile
ifeq ($(UNAME),Darwin)
@open doc/html/index.html
endif
.PHONY: test
test:
@mkdir -p build
@mkdir -p bin
cd build && cmake $(CMAKE_FLAGS) -DSERIAL_BUILD_TESTS=1 -DSERIAL_BUILD_EXAMPLES=1 ..
ifneq ($(MAKE),)
cd build && $(MAKE)
else
cd build && make
endif
cd bin && ./serial_tests

View File

@ -1 +0,0 @@
- git: {local-name: serial, uri: 'https://github.com/wjwwood/serial.git', version: 'v1.0.1'}

View File

@ -1,47 +0,0 @@
macro(build_serial)
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
# Set the build type. Options are:
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
# Debug : w/ debug symbols, w/o optimization
# Release : w/o debug symbols, w/ optimization
# RelWithDebInfo : w/ debug symbols, w/ optimization
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
set(ROS_BUILD_TYPE Debug)
rosbuild_init()
#set the default path for built executables to the "bin" directory
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)
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/winows.cc)
endif(UNIX)
# Build the serial library
rosbuild_add_library(${PROJECT_NAME} ${SERIAL_SRCS})
# Collect Link Libraries
set(SERIAL_LINK_LIBS ${PROJECT_NAME})
if(UNIX AND NOT APPLE)
list(APPEND SERIAL_LINK_LIBS rt pthread util)
endif(UNIX AND NOT APPLE)
# Build example
rosbuild_add_executable(serial_example examples/serial_example.cc)
target_link_libraries(serial_example ${SERIAL_LINK_LIBS})
# Create unit tests
rosbuild_add_gtest(serial_tests tests/serial_tests.cc)
target_link_libraries(serial_tests ${PROJECT_NAME} ${SERIAL_LINK_LIBS})
endmacro(build_serial)

View File

@ -1,9 +0,0 @@
<stack>
<description brief="serial">serial</description>
<author>Maintained by William Woodall</author>
<license>BSD</license>
<review status="unreviewed" notes=""/>
<url>http://ros.org/wiki/serial</url>
<depend stack="ros" />
</stack>