Skip to content

Commit 7ff37df

Browse files
committed
fix gest
1 parent aa71b08 commit 7ff37df

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

.github/workflows/DeployUbuntu.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ jobs:
99
permissions: write-all
1010
steps:
1111
- name: Install dependecies
12-
run: sudo apt-get update && sudo apt-get install cmake -y
12+
run: sudo apt-get update && sudo apt-get install cmake libgtest-dev -y
1313
- name: Get repository code
1414
uses: actions/checkout@v3
1515
with:
1616
submodules: true
17-
- name: Clone gtest library
18-
run: 'git clone https://github.com/google/googletest.git'
1917
- name: Build project
2018
run: |
2119
cmake .

.github/workflows/UnitTest.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ jobs:
1212
permissions: write-all
1313
steps:
1414
- name: Install dependecies
15-
run: sudo apt-get update && sudo apt-get install cmake -y
15+
run: sudo apt-get update && sudo apt-get install cmake libgtest-dev -y
1616
- name: Get repository code
1717
uses: actions/checkout@v3
1818
with:
1919
submodules: true
20-
- name: Clone gtest library
21-
run: git clone https://github.com/google/googletest.git
2220
- name: Build project
2321
run: |
2422
cmake .

CMakeLists.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ set_target_properties(${PROJECT_NAME} ${TEST_NAME}
3737
#
3838
find_package(GTest)
3939

40-
# build googletest
41-
add_subdirectory(
42-
${CMAKE_CURRENT_SOURCE_DIR}/googletest
43-
)
44-
4540
# add src to the include directories for the test target
4641
target_include_directories(${TEST_NAME}
4742
PRIVATE
@@ -53,12 +48,19 @@ target_include_directories(${TEST_NAME}
5348
target_link_libraries(${TEST_NAME}
5449
PRIVATE
5550
${GTEST_BOOTH_LIBRARIES}
56-
gmock
57-
gmock_main
51+
#gmock
52+
#gmock_main
5853
gtest
5954
gtest_main
6055
)
6156

57+
if (MSVC)
58+
# build googletest
59+
add_subdirectory(
60+
${CMAKE_CURRENT_SOURCE_DIR}/googletest
61+
)
62+
endif()
63+
6264

6365
#--------------------------------------------------------------------------------------------------
6466
# compiler settings

0 commit comments

Comments
 (0)