Skip to content

[Media Common] Fetch googletest from upstream for Linux ULT instead o… - #2026

Open
XinfengZhang wants to merge 1 commit into
intel:masterfrom
XinfengZhang:remove_gtest
Open

XinfengZhang wants to merge 1 commit into
intel:masterfrom
XinfengZhang:remove_gtest

Conversation

@XinfengZhang

Copy link
Copy Markdown
Contributor

…f vendoring

Make the Linux ULT (devult) pull googletest from upstream on demand and remove the ~25k-line in-tree copy of googletest, so a normal driver build carries no googletest dependency.

WHAT changed:

  • Add a BUILD_MEDIA_ULT option (default OFF) in media_top_cmake.cmake and AND it into the existing ULT gate. With the default, the linux/ult subdirectory is not added, so no googletest is downloaded and no ULT is built.
  • In linux/ult/CMakeLists.txt, fetch googletest via FetchContent from a configurable repository/tag (default v1.13.0) into a fixed build-tree location, with BUILD_GMOCK and INSTALL_GTEST disabled. GTEST_GIT_REPOSITORY and GTEST_GIT_TAG are cache variables so an internal mirror can be used.
  • In ult_app/CMakeLists.txt, drop add_subdirectory(googletest) and the vendored include path, and link the fetched gtest target instead of libgtest.
  • Delete the vendored media_driver/linux/ult/ult_app/googletest tree.

WHY:
The vendored googletest was a large third-party copy compiled unconditionally whenever the internal test suite was enabled. Fetching it from upstream keeps the repository lean, lets the ULT track a known googletest version, and makes the ULT (and its googletest dependency) fully opt-in.

…f vendoring

Make the Linux ULT (devult) pull googletest from upstream on demand and
remove the ~25k-line in-tree copy of googletest, so a normal driver build
carries no googletest dependency.

WHAT changed:
- Add a BUILD_MEDIA_ULT option (default OFF) in media_top_cmake.cmake and AND
  it into the existing ULT gate. With the default, the linux/ult subdirectory
  is not added, so no googletest is downloaded and no ULT is built.
- In linux/ult/CMakeLists.txt, fetch googletest via FetchContent from a
  configurable repository/tag (default v1.13.0) into a fixed build-tree
  location, with BUILD_GMOCK and INSTALL_GTEST disabled. GTEST_GIT_REPOSITORY
  and GTEST_GIT_TAG are cache variables so an internal mirror can be used.
- In ult_app/CMakeLists.txt, drop add_subdirectory(googletest) and the vendored
  include path, and link the fetched gtest target instead of libgtest.
- Delete the vendored media_driver/linux/ult/ult_app/googletest tree.

WHY:
The vendored googletest was a large third-party copy compiled unconditionally
whenever the internal test suite was enabled. Fetching it from upstream keeps
the repository lean, lets the ULT track a known googletest version, and makes
the ULT (and its googletest dependency) fully opt-in.

Signed-off-by: Carl.Zhang <carl.zhang@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant