Skip to content

Commit 48e22ec

Browse files
committed
#45: Maybe fixed build in CI
1 parent 5cf1160 commit 48e22ec

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

Tests/LowLevel/Mock/CMakeLists.txt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Download GTest
2+
include(FetchContent)
3+
FetchContent_Declare(
4+
gtest
5+
GIT_REPOSITORY "https://github.com/google/googletest.git"
6+
GIT_TAG "main"
7+
)
8+
FetchContent_MakeAvailable(gtest)
9+
10+
# Load mocking lib
111
add_subdirectory(Lib)
212

313
set(MockedModules
@@ -84,15 +94,6 @@ foreach (MockedModule ${MockedSystemModules})
8494
target_include_directories(${MockLibTarget} INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/Mock)
8595
endforeach ()
8696

87-
# Download GTest
88-
include(FetchContent)
89-
FetchContent_Declare(
90-
gtest
91-
GIT_REPOSITORY "https://github.com/google/googletest.git"
92-
GIT_TAG "main"
93-
)
94-
FetchContent_MakeAvailable(gtest)
95-
9697
set(AllTests)
9798

9899
# Function to build a mock test for a module

Tests/LowLevel/Mock/Lib/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ project(MockLib)
22

33
add_library(${PROJECT_NAME} INTERFACE)
44
target_include_directories(${PROJECT_NAME} INTERFACE ..)
5+
target_link_libraries(${PROJECT_NAME} PUBLIC gtest gmock pthread)

0 commit comments

Comments
 (0)