diff --git a/Tests/LowLevel/Mock/CMakeLists.txt b/Tests/LowLevel/Mock/CMakeLists.txt index 5912fec..9d8bfb5 100644 --- a/Tests/LowLevel/Mock/CMakeLists.txt +++ b/Tests/LowLevel/Mock/CMakeLists.txt @@ -1,3 +1,13 @@ +# Download GTest +include(FetchContent) +FetchContent_Declare( + gtest + GIT_REPOSITORY "https://github.com/google/googletest.git" + GIT_TAG "main" +) +FetchContent_MakeAvailable(gtest) + +# Load mocking lib add_subdirectory(Lib) set(MockedModules @@ -84,15 +94,6 @@ foreach (MockedModule ${MockedSystemModules}) target_include_directories(${MockLibTarget} INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/Mock) endforeach () -# Download GTest -include(FetchContent) -FetchContent_Declare( - gtest - GIT_REPOSITORY "https://github.com/google/googletest.git" - GIT_TAG "main" -) -FetchContent_MakeAvailable(gtest) - set(AllTests) # Function to build a mock test for a module diff --git a/Tests/LowLevel/Mock/Lib/CMakeLists.txt b/Tests/LowLevel/Mock/Lib/CMakeLists.txt index 2efef15..d504242 100644 --- a/Tests/LowLevel/Mock/Lib/CMakeLists.txt +++ b/Tests/LowLevel/Mock/Lib/CMakeLists.txt @@ -2,3 +2,4 @@ project(MockLib) add_library(${PROJECT_NAME} INTERFACE) target_include_directories(${PROJECT_NAME} INTERFACE ..) +target_link_libraries(${PROJECT_NAME} PUBLIC gtest gmock pthread)