Skip to content

Commit

Permalink
[Tests] Relocate Googletest to dev requirements (#2512)
Browse files Browse the repository at this point in the history
* Step 0: build pass but tests fail

* Make test build passes

* Adopt reviewer comments
  • Loading branch information
junliume authored Nov 14, 2023
1 parent c87e82a commit 956825a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 84 deletions.
82 changes: 0 additions & 82 deletions cmake/gtest.cmake

This file was deleted.

1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ROCmSoftwarePlatform/rocm-recipes@d7b71f8ff71572833c8cf15b74279dd034e66f9d
-f requirements.txt
danmar/cppcheck@2.9
google/googletest@v1.14.0
9 changes: 7 additions & 2 deletions test/gtest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
include(gtest) #include gtest.cmake
find_package(GTest CONFIG REQUIRED)
if(GTest_FOUND)
MESSAGE(STATUS "GoogleTest: " ${GTest})
enable_testing()
include(GoogleTest)
endif()

find_package(rocblas)

Expand All @@ -23,7 +28,7 @@ function(add_gtest TEST_NAME)
target_include_directories(test_${TEST_NAME} SYSTEM PRIVATE $<BUILD_INTERFACE:${FDEEP_INCLUDE_DIR}>)
target_include_directories(test_${TEST_NAME} SYSTEM PRIVATE $<BUILD_INTERFACE:${EIGEN_INCLUDE_DIR}/eigen3>)
endif()
target_link_libraries(test_${TEST_NAME} gtest gtest_main MIOpen ${Boost_LIBRARIES} hip::host $<BUILD_INTERFACE:roc::rocblas>)
target_link_libraries(test_${TEST_NAME} GTest::gtest GTest::gtest_main MIOpen ${Boost_LIBRARIES} hip::host $<BUILD_INTERFACE:roc::rocblas>)
if(NOT MIOPEN_EMBED_DB STREQUAL "")
target_link_libraries(test_${TEST_NAME} $<BUILD_INTERFACE:miopen_data>)
endif()
Expand Down

0 comments on commit 956825a

Please sign in to comment.