Skip to content

Commit

Permalink
build: use CPM to install missing GTest
Browse files Browse the repository at this point in the history
  • Loading branch information
threeal committed Jul 31, 2024
1 parent 0cd8a57 commit a5b2371
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ jobs:
- name: Checkout this repository
uses: actions/[email protected]

- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtest-dev
- name: Build project
uses: threeal/[email protected]
with:
Expand Down
6 changes: 5 additions & 1 deletion test/gtest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
find_package(GTest REQUIRED)
find_package(GTest QUIET)
if(NOT GTest_FOUND)
cpmaddpackage(gh:google/[email protected])
endif()

find_package(Threads REQUIRED)

add_executable(${PROJECT_NAME}_tests
Expand Down

0 comments on commit a5b2371

Please sign in to comment.