Fixing include paths for previous changes to tests
set(INSTALL_GTEST OFF CACHE BOOL "Install GTest")
add_subdirectory(googletest)
+include_directories("." ${GTEST_SOURCE_DIR}/include)
+
+find_package(Boost COMPONENTS filesystem)
+
if(HIP_FOUND)
set(CMAKE_CXX_COMPILER ${HIP_HIPCC_EXECUTABLE})
endif()
@@ -10,7 +14,6 @@ set(tensile_test_main
test.cpp)
set(test_sources ${test_sources}
- #test.cpp
TestData.cpp
ContractionProblem_test.cpp
@@ -30,12 +33,6 @@ endif()
add_library(TensileCommonTests STATIC ${test_sources})
-#target_include_directories (tests PUBLIC "/opt/rocm/rocblas/include" ".")
-
-include_directories("." ${GTEST_SOURCE_DIR}/include)
-
-find_package(Boost COMPONENTS filesystem)
-
add_executable(TensileTests ${tensile_test_main})
if(GTEST_INTEGRATION)
@@ -44,7 +41,8 @@ else()
add_test(NAME TensileHostLibraryTests COMMAND TensileTests WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
endif()
-target_link_libraries(TensileTests gtest Tensile Boost::filesystem TensileCommonTests)
+target_link_libraries(TensileCommonTests PUBLIC gtest Tensile Boost::filesystem)
+target_link_libraries(TensileTests TensileCommonTests)
file(COPY sample_library.yaml DESTINATION .)
@@ -57,10 +55,5 @@ if(HIP_FOUND)
target_link_libraries(TensileTests TensileHipTests)
target_link_libraries(TensileTests "--amdgpu-target=gfx900")
- # ${HIP_LIBRARIES}
endif()
-
-
-
-#target_include_directories (test PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
