Skip to content

Commit

Permalink
Fetch googletest in the lib directory via CMake.
Browse files Browse the repository at this point in the history
fetch googletest in the lib directory
  • Loading branch information
Paebbels authored Jun 11, 2024
2 parents c2d0fdf + f7603ea commit 570b328
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ jobs:
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
- name: ⏬ Checkout 'google/googletest' repository
uses: actions/checkout@v4
with:
repository: google/googletest
path: examples/Cpp/GoogleTest/lib/googletest
- name: 🔧 Install dependencies
run: sudo apt-get install -y --no-install-recommends ninja-build
- name: 🛠 Run CMake
Expand Down
1 change: 1 addition & 0 deletions examples/Cpp/GoogleTest/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_subdirectory(googletest)
10 changes: 10 additions & 0 deletions examples/Cpp/GoogleTest/lib/googletest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
include(FetchContent)

FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG f8d7d77c06936315286eb55f8de22cd23c188571 # release-1.14.0
)

set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)

0 comments on commit 570b328

Please sign in to comment.