Skip to content

Commit 5a1be95

Browse files
authored
chore(test): use cmake to download gtest (#84)
1 parent 1c79d86 commit 5a1be95

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/ci-test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ jobs:
3636
restore-keys: |
3737
ccache-${{ runner.os }}-build-
3838
39-
- run: sudo apt-get install libgtest-dev
40-
4139
- run: npm run build
4240
- run: npm run lint
4341
- run: npm run test

tests/cpp/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
enable_testing()
22

3-
find_package(GTest REQUIRED CONFIG)
43
include(FetchContent)
4+
FetchContent_Declare(
5+
googletest
6+
URL https://github.com/google/googletest/releases/download/v1.16.0/googletest-1.16.0.tar.gz
7+
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
8+
)
9+
FetchContent_MakeAvailable(googletest)
510

611
file(GLOB test_sources CONFIGURE_DEPENDS *.cpp ./utils/*.cpp) # innclude lit test by default
712

0 commit comments

Comments
 (0)