File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -115,10 +115,7 @@ if(DOWNLOAD_GTEST OR GTEST_SRC_DIR)
115115 ${CMAKE_CURRENT_BINARY_DIR} /googletest-build EXCLUDE_FROM_ALL )
116116
117117 set (GTEST_INCLUDE_DIRS "${gtest_SOURCE_DIR} /include" )
118- add_library (GTest::GTest INTERFACE IMPORTED )
119- target_link_libraries (GTest::GTest INTERFACE gtest)
120- add_library (GTest::Main INTERFACE IMPORTED )
121- target_link_libraries (GTest::Main INTERFACE gtest_main)
118+ set (GTEST_BOTH_LIBRARIES gtest_main gtest)
122119else ()
123120 find_package (GTest REQUIRED)
124121endif ()
@@ -161,7 +158,7 @@ if(DOWNLOAD_GTEST OR GTEST_SRC_DIR)
161158 add_dependencies (test_xtensor_blas gtest_main)
162159endif ()
163160
164- target_link_libraries (test_xtensor_blas ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} GTest::GTest GTest::Main ${CMAKE_THREAD_LIBS_INIT} )
161+ target_link_libraries (test_xtensor_blas ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} )
165162
166163add_custom_target (xtest COMMAND test_xtensor_blas DEPENDS test_xtensor_blas)
167164add_test (NAME xtest COMMAND test_xtensor_blas)
You can’t perform that action at this time.
0 commit comments