From 4c3c396b38dccc6da5d108db35a7cebb8ba08681 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 25 Oct 2025 08:15:59 +0800 Subject: [PATCH] chore: let cmake download gtest --- .github/workflows/ci-test.yml | 2 -- tests/cpp/CMakeLists.txt | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index b923ab0..cb35f83 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -36,8 +36,6 @@ jobs: restore-keys: | ccache-${{ runner.os }}-build- - - run: sudo apt-get install libgtest-dev - - run: npm run build - run: npm run lint - run: npm run test diff --git a/tests/cpp/CMakeLists.txt b/tests/cpp/CMakeLists.txt index 34c2d43..ea71860 100644 --- a/tests/cpp/CMakeLists.txt +++ b/tests/cpp/CMakeLists.txt @@ -1,7 +1,12 @@ enable_testing() -find_package(GTest REQUIRED CONFIG) include(FetchContent) +FetchContent_Declare( + googletest + URL https://github.com/google/googletest/releases/download/v1.16.0/googletest-1.16.0.tar.gz + DOWNLOAD_EXTRACT_TIMESTAMP TRUE +) +FetchContent_MakeAvailable(googletest) file(GLOB test_sources CONFIGURE_DEPENDS *.cpp ./utils/*.cpp) # innclude lit test by default