Skip to content

Commit

Permalink
[test] test wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Quuxplusone committed Oct 19, 2023
1 parent b27c6ec commit e57fcd0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
cmake . -B ./build -G 'Unix Makefiles' \
-DCMAKE_CXX_STANDARD=${{ matrix.cpp_standard }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_DOWNLOAD_GTEST=ON
- name: Build (Windows)
if: matrix.os == 'windows-latest'
Expand All @@ -58,4 +58,4 @@ jobs:
- name: Test
working-directory: ${{ github.workspace }}/build
run: |
make && ./bin/utest
make VERBOSE=1 && ./bin/utest
10 changes: 6 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@

if ("${CMAKE_DOWNLOAD_GTEST}")
include(fetchcontent)
include(FetchContent)
fetchcontent_declare(
googletest
GTest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG f8d7d77c06936315286eb55f8de22cd23c188571 # tagged v1.14.0
)
fetchcontent_makeavailable(googletest)
fetchcontent_makeavailable(GTest)
# find_package(GTest)
else()
find_package(GTest REQUIRED)
endif()
find_package(GTest REQUIRED)

set(TEST_SOURCE_FILES
flat_map_test.cpp
Expand Down

0 comments on commit e57fcd0

Please sign in to comment.