mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -09:00
package/gtest: host-gtest install like a normal cmake package
Currently, host-gtest does not actually build and install gtest libraries or header files; it just installs the gmock_gen stuff. Host gtest can however be used by packages to build and run their unit-tests natively. This patch will now build and install gtest to the host like a normal cmake package. To limit the disruption for existing users of host-gtest, the gmock_gen stuff is still installed (as a post-install hook now). Signed-off-by: Paul Soucy <paul.soucy@sense.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
committed by
Yann E. MORIN
parent
4dff1be05e
commit
c0f9e2447d
@@ -52,14 +52,14 @@ else
|
|||||||
GTEST_CONF_OPTS += -DBUILD_GMOCK=OFF
|
GTEST_CONF_OPTS += -DBUILD_GMOCK=OFF
|
||||||
endif
|
endif
|
||||||
|
|
||||||
define HOST_GTEST_INSTALL_CMDS
|
define HOST_GTEST_POST_INSTALL_PYTHON
|
||||||
$(INSTALL) -D -m 0755 $(@D)/googlemock/scripts/generator/gmock_gen.py \
|
$(INSTALL) -D -m 0755 $(@D)/googlemock/scripts/generator/gmock_gen.py \
|
||||||
$(HOST_DIR)/bin/gmock_gen
|
$(HOST_DIR)/bin/gmock_gen
|
||||||
cp -rp $(@D)/googlemock/scripts/generator/cpp \
|
cp -rp $(@D)/googlemock/scripts/generator/cpp \
|
||||||
$(HOST_GTEST_GMOCK_PYTHONPATH)
|
$(HOST_GTEST_GMOCK_PYTHONPATH)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
HOST_GTEST_POST_INSTALL_HOOKS += HOST_GTEST_POST_INSTALL_PYTHON
|
||||||
|
|
||||||
$(eval $(cmake-package))
|
$(eval $(cmake-package))
|
||||||
# The host package does not build anything, just installs gmock_gen stuff, so
|
$(eval $(host-cmake-package))
|
||||||
# it does not need to be a host-cmake-package.
|
|
||||||
$(eval $(host-generic-package))
|
|
||||||
|
|||||||
Reference in New Issue
Block a user