Skip to content

Commit

Permalink
Disable building GMock and installation of GTest
Browse files Browse the repository at this point in the history
  • Loading branch information
thbeu committed Apr 5, 2024
1 parent 2b0c097 commit 7f07961
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,14 @@ jobs:
- name: Build with gcc
run: |
export PATH=/usr/bin:$PATH
cmake --build build --target install
cmake --build build
shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}'

- name: Test
run: |
export PATH=/usr/bin:/usr/local/bin:$PATH
export PATH=/usr/bin:/usr/local/bin:$BINDIR:$PATH
ctest --test-dir build --build-config Release --verbose
shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}'
env:
CYGWIN_NOWINPATH: 1
BINDIR: ${{ github.workspace }}/build/bin
6 changes: 6 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ FetchContent_Declare(
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)

# Disable building GMock
set(BUILD_GMOCK OFF CACHE BOOL "" FORCE)

# Do not install GTest
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)

FetchContent_MakeAvailable(googletest)

foreach(executable dbf_test sbn_test)
Expand Down

0 comments on commit 7f07961

Please sign in to comment.