From a9293f7b77dc569bfa946c30c71f47d2ae86cbeb Mon Sep 17 00:00:00 2001 From: Bill Teng Date: Sat, 8 Jun 2024 09:50:20 +0000 Subject: [PATCH] #0: fix gtest build error --- CMakeLists.txt | 2 +- tests/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9892da4296b7..1984be72d05d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,7 @@ CPMAddPackage( GITHUB_REPOSITORY google/googletest GIT_TAG release-1.12.1 VERSION 1.12.1 - OPTIONS "INSTALL_GTEST ON" "gtest_force_shared_crt ON" + OPTIONS "INSTALL_GTEST OFF" "gtest_force_shared_crt ON" ) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 03ab524ab4ab..3515c9b500c4 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,6 +1,8 @@ enable_testing() +include(GoogleTest) add_library(test_common_libs INTERFACE) +target_include_directories(test_common_libs INTERFACE "${gtest_SOURCE_DIR}/include") target_link_libraries(test_common_libs INTERFACE pthread stdc++fs gtest gtest_main) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tt_metal/tt_metal)