File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change
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
1
11
add_subdirectory (Lib )
2
12
3
13
set (MockedModules
@@ -84,15 +94,6 @@ foreach (MockedModule ${MockedSystemModules})
84
94
target_include_directories (${MockLibTarget} INTERFACE ${CMAKE_CURRENT_BINARY_DIR} /Mock )
85
95
endforeach ()
86
96
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
-
96
97
set (AllTests )
97
98
98
99
# Function to build a mock test for a module
Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ project(MockLib)
2
2
3
3
add_library (${PROJECT_NAME} INTERFACE )
4
4
target_include_directories (${PROJECT_NAME} INTERFACE .. )
5
+ target_link_libraries (${PROJECT_NAME} PUBLIC gtest gmock pthread )
You can’t perform that action at this time.
0 commit comments