Bump buidlroot version to 2018.02.6
This commit is contained in:
@@ -21,6 +21,34 @@ config BR2_PACKAGE_GTEST
|
||||
|
||||
https://github.com/google/googletest
|
||||
|
||||
if BR2_PACKAGE_GTEST
|
||||
|
||||
config BR2_PACKAGE_GTEST_GMOCK
|
||||
bool "gmock"
|
||||
help
|
||||
Inspired by jMock, EasyMock, and Hamcrest, and designed with
|
||||
C++'s specifics in mind, Google C++ Mocking Framework (or
|
||||
Google Mock for short) is a library for writing and using C++
|
||||
mock classes.
|
||||
|
||||
Google Mock:
|
||||
|
||||
* lets you create mock classes trivially using simple
|
||||
macros, supports a rich set of matchers and actions,
|
||||
* handles unordered, partially ordered, or completely
|
||||
ordered expectations,
|
||||
* is extensible by users, and
|
||||
* works on Linux, Mac OS X, Windows, Windows Mobile, minGW,
|
||||
and Symbian.
|
||||
|
||||
There are both host and target packages. The target one has
|
||||
include files required to compile the tests and the static
|
||||
libraries required to link/run them. The host package installs
|
||||
gmock_gen, a Python script used to generate code mocks.
|
||||
|
||||
endif # BR2_PACKAGE_GTEST
|
||||
|
||||
comment "gtest needs a toolchain w/ C++, wchar, threads"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
|
||||
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_INSTALL_LIBSTDCPP
|
||||
|
||||
11
bsp/buildroot/package/gtest/gmock.pc
Normal file
11
bsp/buildroot/package/gtest/gmock.pc
Normal file
@@ -0,0 +1,11 @@
|
||||
prefix=/usr
|
||||
exec_prefix=${prefix}
|
||||
libdir=${prefix}/lib/
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: gmock
|
||||
Description: Google C++ Mocking Framework
|
||||
Version: 1.8.0
|
||||
Libs: -L${libdir} -lgmock
|
||||
Libs.private: -lpthread
|
||||
Cflags: -I${includedir}
|
||||
@@ -1,2 +1,3 @@
|
||||
# Locally computed:
|
||||
sha256 f73a6546fdf9fce9ff93a5015e0333a8af3062a152a9ad6bcb772c96687016cc gtest-release-1.7.0.tar.gz
|
||||
sha256 58a6f4277ca2bc8565222b3bbd58a177609e9c488e8a72649359ba51450db7d8 gtest-release-1.8.0.tar.gz
|
||||
sha256 9702de7e4117a8e2b20dafab11ffda58c198aede066406496bef670d40a22138 googletest/LICENSE
|
||||
|
||||
@@ -4,13 +4,29 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Make sure this remains the same version as the gmock one
|
||||
GTEST_VERSION = release-1.7.0
|
||||
GTEST_VERSION = release-1.8.0
|
||||
GTEST_SITE = $(call github,google,googletest,$(GTEST_VERSION))
|
||||
GTEST_INSTALL_STAGING = YES
|
||||
GTEST_INSTALL_TARGET = NO
|
||||
GTEST_LICENSE = BSD-3c
|
||||
GTEST_LICENSE_FILES = LICENSE
|
||||
GTEST_LICENSE = BSD-3-Clause
|
||||
GTEST_LICENSE_FILES = googletest/LICENSE
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GTEST_GMOCK),y)
|
||||
GTEST_DEPENDENCIES += host-gtest
|
||||
endif
|
||||
|
||||
HOST_GTEST_LICENSE = Apache-2.0
|
||||
HOST_GTEST_LICENSE_FILES = googlemock/scripts/generator/LICENSE
|
||||
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
||||
HOST_GTEST_PYTHON_VERSION = $(PYTHON3_VERSION_MAJOR)
|
||||
HOST_GTEST_DEPENDENCIES += host-python3
|
||||
else
|
||||
HOST_GTEST_PYTHON_VERSION = $(PYTHON_VERSION_MAJOR)
|
||||
HOST_GTEST_DEPENDENCIES += host-python
|
||||
endif
|
||||
|
||||
HOST_GTEST_GMOCK_PYTHONPATH = \
|
||||
$(HOST_DIR)/lib/python$(HOST_GTEST_PYTHON_VERSION)/site-packages
|
||||
|
||||
# While it is possible to build gtest as shared library, using this gtest shared
|
||||
# library requires to set some special configure option in the project using
|
||||
@@ -21,11 +37,22 @@ GTEST_LICENSE_FILES = LICENSE
|
||||
# the gtest sources.
|
||||
GTEST_CONF_OPTS = -DBUILD_SHARED_LIBS=OFF
|
||||
|
||||
define GTEST_INSTALL_STAGING_CMDS
|
||||
$(INSTALL) -D -m 0755 $(@D)/libgtest.a $(STAGING_DIR)/usr/lib/libgtest.a
|
||||
$(INSTALL) -D -m 0755 $(@D)/libgtest_main.a $(STAGING_DIR)/usr/lib/libgtest_main.a
|
||||
$(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include/gtest/
|
||||
cp -rp $(@D)/include/gtest/* $(STAGING_DIR)/usr/include/gtest/
|
||||
# Ensure that GTest is compiled with -fPIC to allow linking the static
|
||||
# libraries with dynamically linked programs. This is not a requirement
|
||||
# for most architectures but is mandatory for ARM.
|
||||
ifeq ($(BR2_STATIC_LIBS),)
|
||||
GTEST_CONF_OPTS += -DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
endif
|
||||
|
||||
GTEST_CONF_OPTS += -DBUILD_GTEST=ON
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GTEST_GMOCK),y)
|
||||
GTEST_CONF_OPTS += -DBUILD_GMOCK=ON
|
||||
else
|
||||
GTEST_CONF_OPTS += -DBUILD_GMOCK=OFF
|
||||
endif
|
||||
|
||||
define GTEST_INSTALL_MISSING_FILES
|
||||
$(INSTALL) -D -m 0644 package/gtest/gtest.pc \
|
||||
$(STAGING_DIR)/usr/lib/pkgconfig/gtest.pc
|
||||
# Generate the gtest-config script manually, since the CMake
|
||||
@@ -39,9 +66,30 @@ define GTEST_INSTALL_STAGING_CMDS
|
||||
s%@bindir@%$(STAGING_DIR)/usr/bin%;\
|
||||
s%@PTHREAD_CFLAGS@%%;\
|
||||
s%@PTHREAD_LIBS@%-lpthread%;' \
|
||||
$(@D)/scripts/gtest-config.in \
|
||||
$(@D)/googletest/scripts/gtest-config.in \
|
||||
> $(STAGING_DIR)/usr/bin/gtest-config
|
||||
chmod +x $(STAGING_DIR)/usr/bin/gtest-config
|
||||
endef
|
||||
|
||||
GTEST_POST_INSTALL_STAGING_HOOKS = GTEST_INSTALL_MISSING_FILES
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GTEST_GMOCK),y)
|
||||
define GTEST_GMOCK_INSTALL_MISSING_FILE
|
||||
$(INSTALL) -D -m 0644 package/gtest/gmock.pc \
|
||||
$(STAGING_DIR)/usr/lib/pkgconfig/gmock.pc
|
||||
endef
|
||||
|
||||
GTEST_POST_INSTALL_STAGING_HOOKS += GTEST_GMOCK_INSTALL_MISSING_FILE
|
||||
endif
|
||||
|
||||
define HOST_GTEST_INSTALL_CMDS
|
||||
$(INSTALL) -D -m 0755 $(@D)/googlemock/scripts/generator/gmock_gen.py \
|
||||
$(HOST_DIR)/bin/gmock_gen
|
||||
cp -rp $(@D)/googlemock/scripts/generator/cpp \
|
||||
$(HOST_GTEST_GMOCK_PYTHONPATH)
|
||||
endef
|
||||
|
||||
$(eval $(cmake-package))
|
||||
# The host package does not build anything, just installs gmock_gen stuff, so
|
||||
# it does not need to be a host-cmake-package.
|
||||
$(eval $(host-generic-package))
|
||||
|
||||
@@ -5,7 +5,7 @@ includedir=${prefix}/include
|
||||
|
||||
Name: gtest
|
||||
Description: Google C++ Testing Framework
|
||||
Version: 1.7.0
|
||||
Version: 1.8.0
|
||||
Libs: -L${libdir} -lgtest
|
||||
Libs.private: -lpthread
|
||||
Cflags: -I${includedir}
|
||||
|
||||
Reference in New Issue
Block a user