reverting gtest conversion to rosdep since it is not compatable on jaunty, due to runtime linking errors from incorrect rpath ordering
This commit is contained in:
parent
593ba78d5c
commit
40aac3e8f8
|
@ -0,0 +1,15 @@
|
|||
# This file is not currently used. It represents a work-in-progress toward
|
||||
# using CMake to download and build 3rdparty software.
|
||||
cmake_minimum_required(VERSION 2.4.6)
|
||||
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
|
||||
|
||||
|
||||
rospack_wget_and_build(gtest-1.0.1.tar.gz
|
||||
http://pr.willowgarage.com/downloads/gtest-1.0.1.tar.gz
|
||||
gtest-1.0.1
|
||||
"tar xzf"
|
||||
"./configure --prefix=${CMAKE_SOURCE_DIR}/gtest"
|
||||
"make"
|
||||
"make install")
|
||||
|
||||
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_SOURCE_DIR}/gtest)
|
|
@ -0,0 +1,28 @@
|
|||
all: gtest
|
||||
|
||||
TARBALL = build/gtest-1.4.0.tar.gz
|
||||
TARBALL_URL = http://pr.willowgarage.com/downloads/gtest-1.4.0.tar.gz
|
||||
SOURCE_DIR = build/gtest-1.4.0
|
||||
MD5SUM_FILE = gtest-1.4.0.tar.gz.md5sum
|
||||
include $(shell rospack find mk)/download_unpack_build.mk
|
||||
|
||||
# gtest's death test appears to hang when gtest is compiled with Bullseye's
|
||||
# gcc wrapper. So, if COVFILE is set (which indicates that we're doing a
|
||||
# coverage build), then we heuristically modify the PATH to get at the
|
||||
# real gcc.
|
||||
ifneq ($(strip $(COVFILE)),)
|
||||
NEWPATH = /usr/bin:$(PATH)
|
||||
else
|
||||
NEWPATH = $(PATH)
|
||||
endif
|
||||
|
||||
gtest: $(SOURCE_DIR)/unpacked
|
||||
cd $(SOURCE_DIR) && PATH=$(NEWPATH) ./configure --prefix=$(CURDIR)/gtest
|
||||
cd $(SOURCE_DIR) && PATH=$(NEWPATH) make install
|
||||
touch gtest
|
||||
|
||||
clean:
|
||||
rm -rf gtest $(SOURCE_DIR)
|
||||
|
||||
wipe: clean
|
||||
rm -rf build
|
|
@ -0,0 +1 @@
|
|||
ec1dd5ab07cde5da033b1d631e621167 gtest-1.4.0.tar.gz
|
|
@ -0,0 +1,23 @@
|
|||
<package>
|
||||
<description brief="Googletest unit testing framework for C++">
|
||||
|
||||
gtest contains
|
||||
the <a href="http://code.google.com/p/googletest/">googletest</a>
|
||||
framework for C++, by Google. gtest is the standard unit test
|
||||
library for ROS code written in C++, including
|
||||
<a href="http://www.ros.org/wiki/roscpp">roscpp</a> and, as such,
|
||||
is included within the ROS distribution. This package wraps version
|
||||
1.4.0. Our intent is to migrate to OS package manager distributions
|
||||
as this library becomes more widely available. Until then we will
|
||||
track the latest stable version which is backwards compatable.
|
||||
|
||||
</description>
|
||||
<author>Google</author>
|
||||
<license>BSD</license>
|
||||
<review status="3rdparty doc reviewed" notes="gerkey, 10/2/2009"/>
|
||||
<url>http://ros.org/wiki/gtest/</url>
|
||||
<export>
|
||||
<rosdoc external="http://code.google.com/p/googletest/w/list"/>
|
||||
</export>
|
||||
</package>
|
||||
|
|
@ -398,46 +398,13 @@ macro(rosbuild_init)
|
|||
# Gather the gtest build flags, for use when building unit tests. We
|
||||
# don't require the user to declare a dependency on gtest.
|
||||
#
|
||||
find_program(GTEST_EXE NAMES gtest-config DOC "gtest-config executable")
|
||||
if (NOT GTEST_EXE)
|
||||
set(_gtest_LIBRARIES -lgtest)
|
||||
# Couldn't find gtest-config. Hoping that gtest is in our path either in the system install or where ROS_BINDEPS points to
|
||||
else (NOT GTEST_EXE)
|
||||
|
||||
execute_process(COMMAND ${GTEST_EXE} --includedir
|
||||
OUTPUT_VARIABLE gtest_include_dir
|
||||
RESULT_VARIABLE _gtest_include_dir
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(_gtest_include_dir)
|
||||
message(FATAL_ERROR "Failed to invoke gtest-config")
|
||||
endif(_gtest_include_dir)
|
||||
|
||||
include_directories(${gtest_include_dir})
|
||||
|
||||
execute_process(COMMAND ${GTEST_EXE} --libdir
|
||||
OUTPUT_VARIABLE gtest_lib_dir
|
||||
RESULT_VARIABLE _gtest_lib_dir
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(_gtest_lib_dir)
|
||||
message(FATAL_ERROR "Failed to invoke gtest-config")
|
||||
endif(_gtest_lib_dir)
|
||||
link_directories(${gtest_lib_dir})
|
||||
|
||||
|
||||
execute_process(COMMAND ${GTEST_EXE} --libs
|
||||
OUTPUT_VARIABLE gtest_libs
|
||||
RESULT_VARIABLE _gtest_libs
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(_gtest_libs)
|
||||
message(FATAL_ERROR "Failed to invoke gtest-config")
|
||||
endif(_gtest_libs)
|
||||
|
||||
|
||||
set(_gtest_LIBRARIES ${gtest_libs})
|
||||
rosbuild_invoke_rospack(gtest _gtest PACKAGE_PATH find)
|
||||
include_directories(${_gtest_PACKAGE_PATH}/gtest/include)
|
||||
link_directories(${_gtest_PACKAGE_PATH}/gtest/lib)
|
||||
set(_gtest_LIBRARIES -lgtest)
|
||||
set(_gtest_CFLAGS_OTHER "")
|
||||
set(_gtest_LDFLAGS_OTHER "-Wl,-rpath,${gtest_lib_dir}")
|
||||
endif (NOT GTEST_EXE)
|
||||
|
||||
set(_gtest_LDFLAGS_OTHER "-Wl,-rpath,${_gtest_PACKAGE_PATH}/gtest/lib")
|
||||
|
||||
#
|
||||
# The following code removes duplicate libraries from the link line,
|
||||
# saving only the last one.
|
||||
|
|
|
@ -22,6 +22,5 @@
|
|||
<rosdep name="bzip2"/>
|
||||
<rosdep name="zlib"/>
|
||||
<rosdep name="boost"/>
|
||||
<rosdep name="gtest"/>
|
||||
|
||||
</package>
|
||||
|
|
30
rosdep.yaml
30
rosdep.yaml
|
@ -435,35 +435,7 @@ fltk:
|
|||
epydoc:
|
||||
ubuntu: python-epydoc
|
||||
macports: py25-epydoc
|
||||
gtest:
|
||||
ubuntu:
|
||||
10.04: libgtest-dev
|
||||
9.10: libgtest-dev
|
||||
'9.04': |
|
||||
if [ -z `which gtest-config` ]; then
|
||||
mkdir -p /usr/local/src
|
||||
cd /usr/local/src
|
||||
sudo wget --tries=10 http://pr.willowgarage.com/downloads/gtest-1.3.0.tar.gz
|
||||
sudo tar xzf gtest-1.3.0.tar.gz
|
||||
cd gtest-1.3.0
|
||||
sudo ./configure
|
||||
sudo make
|
||||
sudo make install
|
||||
fi
|
||||
'8.10': |
|
||||
if [ ! -f /opt/ros/lib/libgtest.so.0 ] ; then
|
||||
mkdir -p ~/ros/ros-deps
|
||||
cd ~/ros/ros-deps
|
||||
wget --tries=10 http://pr.willowgarage.com/downloads/gtest-1.3.0.tar.gz
|
||||
tar xzf gtest-1.3.0.tar.gz
|
||||
cd gtest-1.3.0
|
||||
./configure --prefix=/opt/ros
|
||||
make
|
||||
sudo make install
|
||||
fi
|
||||
debian: libgtest-dev
|
||||
macports: google-test
|
||||
paramiko:
|
||||
ubuntu: python-paramiko
|
||||
debian: python-paramiko
|
||||
macports: py25-paramiko
|
||||
macports: py25-paramiko
|
|
@ -688,11 +688,11 @@ class RosMakeAll:
|
|||
build_passed = True
|
||||
if building:
|
||||
#make sure required packages are built before continuing (These are required by internal functions
|
||||
self.assert_prebuild_built(["tools/rospack", "core/genmsg_cpp"])
|
||||
self.assert_prebuild_built(["tools/rospack", "3rdparty/gtest", "core/genmsg_cpp"])
|
||||
|
||||
self.print_verbose ("Building packages %s"% self.build_list)
|
||||
build_queue = parallel_build.BuildQueue(self.build_list, self.dependency_tracker, robust_build = options.robust or options.best_effort)
|
||||
build_queue.register_prebuilt(["rospack", "genmsg_cpp"])
|
||||
build_queue.register_prebuilt(["rospack", "gtest", "genmsg_cpp"])
|
||||
|
||||
build_passed = self.parallel_build_pkgs(build_queue, options.target, threads = options.threads)
|
||||
if "rospack" in self.build_list and options.target == "clean" and not self.flag_tracker.has_nobuild("rospack"):
|
||||
|
|
Loading…
Reference in New Issue