From be2e3e31bd210d28336b7f747b01995669a91617 Mon Sep 17 00:00:00 2001 From: AndreVale69 Date: Sat, 1 Jun 2024 23:15:37 +0200 Subject: [PATCH] Updated workflow --- .github/workflows/ci-cd.yaml | 2 ++ CMakeLists.txt | 10 ++-------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index f055995..68b6ab9 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -9,6 +9,8 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Import GoogleTest + run: git submodule update --init --recursive # doc: https://google.github.io/googletest/quickstart-cmake.html#create-and-run-a-binary - name: Build and run the tests run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 3cbcc41..7707e20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,13 +5,7 @@ project(MatrixMultiplication) include_directories(include) -include(FetchContent) -FetchContent_Declare( - googletest - URL https://github.com/google/googletest/archive/305e5a238b3c8d11266fbafd85520fb6b3184851.zip -) -FetchContent_MakeAvailable(googletest) -#add_subdirectory(googletest) +add_subdirectory(googletest) include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR}) add_executable(test_multiplication test/test_matrix_multiplication.cpp) @@ -22,4 +16,4 @@ enable_testing() include(GoogleTest) -gtest_discover_tests(test_multiplication) +gtest_discover_tests(test_multiplication) \ No newline at end of file