Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions media_driver/linux/ult/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,27 @@ else ()
endif ()
endif ()

# Fetch googletest from upstream instead of vendoring a copy in-tree.
# It is downloaded/built into a fixed location under the build tree.
# The repository URL and tag can be overridden from the cmake command line,
# e.g. -DGTEST_GIT_REPOSITORY=<internal-mirror> -DGTEST_GIT_TAG=<tag>.
include(FetchContent)
set(GTEST_GIT_REPOSITORY "https://github.com/google/googletest.git" CACHE STRING "googletest git repository URL")
set(GTEST_GIT_TAG "v1.13.0" CACHE STRING "googletest git tag to fetch")
message("-- devult -- Fetching googletest ${GTEST_GIT_TAG} from ${GTEST_GIT_REPOSITORY}")

# Only the gtest library is needed; skip gmock and installation.
set(BUILD_GMOCK OFF CACHE BOOL "" FORCE)
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)

FetchContent_Declare(
googletest
GIT_REPOSITORY ${GTEST_GIT_REPOSITORY}
GIT_TAG ${GTEST_GIT_TAG}
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/_deps/googletest-src
)
FetchContent_MakeAvailable(googletest)

add_subdirectory(libdrm_mock)
add_subdirectory(ult_app)

Expand Down
5 changes: 1 addition & 4 deletions media_driver/linux/ult/ult_app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@ cmake_minimum_required(VERSION 3.1)

project(devult)

add_subdirectory(googletest)

set(agnostic_cm_tests ../../../agnostic/ult/cm)

set(INTERNAL_INC_PATH
../inc
./cm
./googletest/include
./gpu_cmd
${agnostic_cm_tests}
../../../linux/common/cp/shared
Expand Down Expand Up @@ -59,7 +56,7 @@ else ()
endif ()

add_executable(devult ${SOURCES})
target_link_libraries(devult libgtest libdl.so)
target_link_libraries(devult gtest libdl.so)
target_include_directories(devult BEFORE PRIVATE
${SOFTLET_MOS_PREPEND_INCLUDE_DIRS_}
${MOS_PUBLIC_INCLUDE_DIRS_} ${SOFTLET_MOS_PUBLIC_INCLUDE_DIRS_}
Expand Down
29 changes: 0 additions & 29 deletions media_driver/linux/ult/ult_app/googletest/CMakeLists.txt

This file was deleted.

This file was deleted.

Loading
Loading