diff --git a/tests/unit_tests/CMakeLists.txt b/tests/unit_tests/CMakeLists.txt index e7fe8e110..c344d6271 100644 --- a/tests/unit_tests/CMakeLists.txt +++ b/tests/unit_tests/CMakeLists.txt @@ -18,11 +18,21 @@ #=============================================================================== if("blas" IN_LIST TARGET_DOMAINS) - find_package(CBLAS REQUIRED) + find_package(CBLAS) + if(NOT CBLAS_FOUND) + # TODO: add list of tests without Netlib dependency + message(WARNING "Netlib CBLAS headers or libraries are not found, BLAS unit tests will be skipped") + list(REMOVE_ITEM TARGET_DOMAINS "blas") + endif() endif() if("lapack" IN_LIST TARGET_DOMAINS) - find_package(LAPACKE REQUIRED) + find_package(LAPACKE) + if(NOT LAPACKE_FOUND) + # TODO: add list of tests without Netlib dependency + message(WARNING "Netlib LAPACKE headers or libraries are not found, LAPACK unit tests will be skipped") + list(REMOVE_ITEM TARGET_DOMAINS "lapack") + endif() endif() foreach(domain ${TARGET_DOMAINS}) @@ -50,7 +60,9 @@ set(blas_TEST_LINK "") set(lapack_TEST_LIST lapack_source) -set(lapack_TEST_LINK ${LAPACKE_LINK}) +if(LAPACKE_FOUND) + set(lapack_TEST_LINK ${LAPACKE_LINK}) +endif() # RNG config set(rng_TEST_LIST @@ -195,7 +207,7 @@ foreach(domain ${TARGET_DOMAINS}) string(TOUPPER ${domain} DOMAIN_PREFIX) - if(domain STREQUAL "blas") + if(domain STREQUAL "blas" AND CBLAS_FOUND) set(TEST_LD_LIBRARY_PATH ${CMAKE_BINARY_DIR}/lib:${CBLAS_LIB_DIR}:$ENV{LD_LIBRARY_PATH}) else() set(TEST_LD_LIBRARY_PATH ${CMAKE_BINARY_DIR}/lib:$ENV{LD_LIBRARY_PATH}) diff --git a/tests/unit_tests/blas/batch/CMakeLists.txt b/tests/unit_tests/blas/batch/CMakeLists.txt index 0f47f37af..35ea351a4 100644 --- a/tests/unit_tests/blas/batch/CMakeLists.txt +++ b/tests/unit_tests/blas/batch/CMakeLists.txt @@ -18,10 +18,12 @@ #=============================================================================== # Build object from all test sources -set(BATCH_SOURCES "copy_batch_stride.cpp" "axpy_batch_stride.cpp" "dgmm_batch_stride.cpp" "gemm_batch_stride.cpp" "gemv_batch_stride.cpp" "trsm_batch_stride.cpp" "syrk_batch_stride.cpp" "copy_batch_usm.cpp" "copy_batch_stride_usm.cpp" "axpy_batch_usm.cpp" "axpy_batch_stride_usm.cpp" "dgmm_batch_usm.cpp" "dgmm_batch_stride_usm.cpp" "gemm_batch_usm.cpp" "gemm_batch_stride_usm.cpp" "gemv_batch_usm.cpp" "gemv_batch_stride_usm.cpp" "trsm_batch_usm.cpp" "trsm_batch_stride_usm.cpp" "syrk_batch_usm.cpp" "syrk_batch_stride_usm.cpp" "omatcopy_batch_stride.cpp" "omatcopy_batch_stride_usm.cpp" "imatcopy_batch_stride.cpp" "imatcopy_batch_stride_usm.cpp" "omatadd_batch_stride.cpp" "omatadd_batch_stride_usm.cpp" "omatcopy_batch_usm.cpp" "imatcopy_batch_usm.cpp") +set(BATCH_SOURCES_W_CBLAS "copy_batch_stride.cpp" "axpy_batch_stride.cpp" "dgmm_batch_stride.cpp" "gemm_batch_stride.cpp" "gemv_batch_stride.cpp" "trsm_batch_stride.cpp" "syrk_batch_stride.cpp" "copy_batch_usm.cpp" "copy_batch_stride_usm.cpp" "axpy_batch_usm.cpp" "axpy_batch_stride_usm.cpp" "dgmm_batch_usm.cpp" "dgmm_batch_stride_usm.cpp" "gemm_batch_usm.cpp" "gemm_batch_stride_usm.cpp" "gemv_batch_usm.cpp" "gemv_batch_stride_usm.cpp" "trsm_batch_usm.cpp" "trsm_batch_stride_usm.cpp" "syrk_batch_usm.cpp" "syrk_batch_stride_usm.cpp" "omatcopy_batch_stride.cpp" "omatcopy_batch_stride_usm.cpp" "imatcopy_batch_stride.cpp" "imatcopy_batch_stride_usm.cpp" "omatadd_batch_stride.cpp" "omatadd_batch_stride_usm.cpp" "omatcopy_batch_usm.cpp" "imatcopy_batch_usm.cpp") +# TODO: add list of tests without Netlib dependency +set(BATCH_SOURCES) if(BUILD_SHARED_LIBS) - add_library(blas_batch_rt OBJECT ${BATCH_SOURCES}) + add_library(blas_batch_rt OBJECT $<$:${BATCH_SOURCES_W_CBLAS}> ${BATCH_SOURCES}) target_compile_options(blas_batch_rt PRIVATE -DCALL_RT_API -DNOMINMAX) target_include_directories(blas_batch_rt PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include @@ -29,16 +31,16 @@ if(BUILD_SHARED_LIBS) PUBLIC ${PROJECT_SOURCE_DIR}/include PUBLIC ${PROJECT_SOURCE_DIR}/deps/googletest/include PUBLIC ${CMAKE_BINARY_DIR}/bin - PUBLIC ${CBLAS_INCLUDE} + $<$:${CBLAS_INCLUDE}> ) if (USE_ADD_SYCL_TO_TARGET_INTEGRATION) - add_sycl_to_target(TARGET blas_batch_rt SOURCES ${BATCH_SOURCES}) + add_sycl_to_target(TARGET blas_batch_rt SOURCES $<$:${BATCH_SOURCES_W_CBLAS}> ${BATCH_SOURCES}) else() target_link_libraries(blas_batch_rt PUBLIC ONEMKL::SYCL::SYCL) endif() endif() -add_library(blas_batch_ct OBJECT ${BATCH_SOURCES}) +add_library(blas_batch_ct OBJECT $<$:${BATCH_SOURCES_W_CBLAS}> ${BATCH_SOURCES}) target_compile_options(blas_batch_ct PRIVATE -DNOMINMAX) target_include_directories(blas_batch_ct PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include @@ -46,10 +48,10 @@ target_include_directories(blas_batch_ct PUBLIC ${PROJECT_SOURCE_DIR}/include PUBLIC ${PROJECT_SOURCE_DIR}/deps/googletest/include PUBLIC ${CMAKE_BINARY_DIR}/bin - PUBLIC ${CBLAS_INCLUDE} + $<$:${CBLAS_INCLUDE}> ) if (USE_ADD_SYCL_TO_TARGET_INTEGRATION) - add_sycl_to_target(TARGET blas_batch_ct SOURCES ${BATCH_SOURCES}) + add_sycl_to_target(TARGET blas_batch_ct SOURCES $<$:${BATCH_SOURCES_W_CBLAS}> ${BATCH_SOURCES}) else() target_link_libraries(blas_batch_ct PUBLIC ONEMKL::SYCL::SYCL) endif() diff --git a/tests/unit_tests/blas/extensions/CMakeLists.txt b/tests/unit_tests/blas/extensions/CMakeLists.txt index af58e5076..e6bd482ac 100644 --- a/tests/unit_tests/blas/extensions/CMakeLists.txt +++ b/tests/unit_tests/blas/extensions/CMakeLists.txt @@ -18,10 +18,12 @@ #=============================================================================== # Build object from all test sources -set(EXTENSIONS_SOURCES "gemm_bias.cpp" "gemmt.cpp" "gemm_bias_usm.cpp" "gemmt_usm.cpp" "omatcopy.cpp" "omatcopy_usm.cpp" "imatcopy.cpp" "imatcopy_usm.cpp" "omatadd.cpp" "omatadd_usm.cpp" "omatcopy2.cpp" "omatcopy2_usm.cpp") +set(EXTENSIONS_SOURCES_W_CBLAS "gemm_bias.cpp" "gemmt.cpp" "gemm_bias_usm.cpp" "gemmt_usm.cpp" "omatcopy.cpp" "omatcopy_usm.cpp" "imatcopy.cpp" "imatcopy_usm.cpp" "omatadd.cpp" "omatadd_usm.cpp" "omatcopy2.cpp" "omatcopy2_usm.cpp") +# TODO: add list of tests without Netlib dependency +set(EXTENSIONS_SOURCES) if(BUILD_SHARED_LIBS) - add_library(blas_extensions_rt OBJECT ${EXTENSIONS_SOURCES}) + add_library(blas_extensions_rt OBJECT $<$:${EXTENSIONS_SOURCES_W_CBLAS}> ${EXTENSIONS_SOURCES}) target_compile_options(blas_extensions_rt PRIVATE -DCALL_RT_API -DNOMINMAX) target_include_directories(blas_extensions_rt PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include @@ -29,16 +31,16 @@ if(BUILD_SHARED_LIBS) PUBLIC ${PROJECT_SOURCE_DIR}/include PUBLIC ${PROJECT_SOURCE_DIR}/deps/googletest/include PUBLIC ${CMAKE_BINARY_DIR}/bin - PUBLIC ${CBLAS_INCLUDE} + $<$:${CBLAS_INCLUDE}> ) if (USE_ADD_SYCL_TO_TARGET_INTEGRATION) - add_sycl_to_target(TARGET blas_extensions_rt SOURCES ${EXTENSIONS_SOURCES}) + add_sycl_to_target(TARGET blas_extensions_rt SOURCES $<$:${EXTENSIONS_SOURCES_W_CBLAS}> ${EXTENSIONS_SOURCES}) else() target_link_libraries(blas_extensions_rt PUBLIC ONEMKL::SYCL::SYCL) endif() endif() -add_library(blas_extensions_ct OBJECT ${EXTENSIONS_SOURCES}) +add_library(blas_extensions_ct OBJECT $<$:${EXTENSIONS_SOURCES_W_CBLAS}> ${EXTENSIONS_SOURCES}) target_compile_options(blas_extensions_ct PRIVATE -DNOMINMAX) target_include_directories(blas_extensions_ct PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include @@ -46,10 +48,10 @@ target_include_directories(blas_extensions_ct PUBLIC ${PROJECT_SOURCE_DIR}/include PUBLIC ${PROJECT_SOURCE_DIR}/deps/googletest/include PUBLIC ${CMAKE_BINARY_DIR}/bin - PUBLIC ${CBLAS_INCLUDE} + $<$:${CBLAS_INCLUDE}> ) if (USE_ADD_SYCL_TO_TARGET_INTEGRATION) - add_sycl_to_target(TARGET blas_extensions_ct SOURCES ${EXTENSIONS_SOURCES}) + add_sycl_to_target(TARGET blas_extensions_ct SOURCES $<$:${EXTENSIONS_SOURCES_W_CBLAS}> ${EXTENSIONS_SOURCES}) else() target_link_libraries(blas_extensions_ct PUBLIC ONEMKL::SYCL::SYCL) endif() diff --git a/tests/unit_tests/blas/level1/CMakeLists.txt b/tests/unit_tests/blas/level1/CMakeLists.txt index f02adbde3..cda7bf4c4 100644 --- a/tests/unit_tests/blas/level1/CMakeLists.txt +++ b/tests/unit_tests/blas/level1/CMakeLists.txt @@ -18,10 +18,12 @@ #=============================================================================== # Build object from all test sources -set(L1_SOURCES "nrm2.cpp" "iamin.cpp" "iamax.cpp" "dotu.cpp" "dot.cpp" "dotc.cpp" "copy.cpp" "axpy.cpp" "axpby.cpp" "asum.cpp" "swap.cpp" "sdsdot.cpp" "scal.cpp" "rotmg.cpp" "rotm.cpp" "rotg.cpp" "rot.cpp" "nrm2_usm.cpp" "iamin_usm.cpp" "iamax_usm.cpp" "dotu_usm.cpp" "dot_usm.cpp" "dotc_usm.cpp" "copy_usm.cpp" "axpy_usm.cpp" "axpby_usm.cpp" "asum_usm.cpp" "swap_usm.cpp" "sdsdot_usm.cpp" "scal_usm.cpp" "rotmg_usm.cpp" "rotm_usm.cpp" "rotg_usm.cpp" "rot_usm.cpp") +set(L1_SOURCES_W_CBLAS "nrm2.cpp" "iamin.cpp" "iamax.cpp" "dotu.cpp" "dot.cpp" "dotc.cpp" "copy.cpp" "axpy.cpp" "axpby.cpp" "asum.cpp" "swap.cpp" "sdsdot.cpp" "scal.cpp" "rotmg.cpp" "rotm.cpp" "rotg.cpp" "rot.cpp" "nrm2_usm.cpp" "iamin_usm.cpp" "iamax_usm.cpp" "dotu_usm.cpp" "dot_usm.cpp" "dotc_usm.cpp" "copy_usm.cpp" "axpy_usm.cpp" "axpby_usm.cpp" "asum_usm.cpp" "swap_usm.cpp" "sdsdot_usm.cpp" "scal_usm.cpp" "rotmg_usm.cpp" "rotm_usm.cpp" "rotg_usm.cpp" "rot_usm.cpp") +# TODO: add list of tests without Netlib dependency +set(L1_SOURCES) if(BUILD_SHARED_LIBS) - add_library(blas_level1_rt OBJECT ${L1_SOURCES}) + add_library(blas_level1_rt OBJECT $<$:${L1_SOURCES_W_CBLAS}> ${L1_SOURCES}) target_compile_options(blas_level1_rt PRIVATE -DCALL_RT_API -DNOMINMAX) target_include_directories(blas_level1_rt PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include @@ -29,16 +31,16 @@ if(BUILD_SHARED_LIBS) PUBLIC ${PROJECT_SOURCE_DIR}/include PUBLIC ${PROJECT_SOURCE_DIR}/deps/googletest/include PUBLIC ${CMAKE_BINARY_DIR}/bin - PUBLIC ${CBLAS_INCLUDE} + $<$:${CBLAS_INCLUDE}> ) if (USE_ADD_SYCL_TO_TARGET_INTEGRATION) - add_sycl_to_target(TARGET blas_level1_rt SOURCES ${L1_SOURCES}) + add_sycl_to_target(TARGET blas_level1_rt SOURCES $<$:${L1_SOURCES_W_CBLAS}> ${L1_SOURCES}) else() target_link_libraries(blas_level1_rt PUBLIC ONEMKL::SYCL::SYCL) endif() endif() -add_library(blas_level1_ct OBJECT ${L1_SOURCES}) +add_library(blas_level1_ct OBJECT $<$:${L1_SOURCES_W_CBLAS}> ${L1_SOURCES}) target_compile_options(blas_level1_ct PRIVATE -DNOMINMAX) target_include_directories(blas_level1_ct PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include @@ -46,10 +48,10 @@ target_include_directories(blas_level1_ct PUBLIC ${PROJECT_SOURCE_DIR}/include PUBLIC ${PROJECT_SOURCE_DIR}/deps/googletest/include PUBLIC ${CMAKE_BINARY_DIR}/bin - PUBLIC ${CBLAS_INCLUDE} + $<$:${CBLAS_INCLUDE}> ) if (USE_ADD_SYCL_TO_TARGET_INTEGRATION) - add_sycl_to_target(TARGET blas_level1_ct SOURCES ${L1_SOURCES}) + add_sycl_to_target(TARGET blas_level1_ct SOURCES $<$:${L1_SOURCES_W_CBLAS}> ${L1_SOURCES}) else() target_link_libraries(blas_level1_ct PUBLIC ONEMKL::SYCL::SYCL) endif() diff --git a/tests/unit_tests/blas/level2/CMakeLists.txt b/tests/unit_tests/blas/level2/CMakeLists.txt index a61bcfeef..25ba63938 100644 --- a/tests/unit_tests/blas/level2/CMakeLists.txt +++ b/tests/unit_tests/blas/level2/CMakeLists.txt @@ -18,10 +18,12 @@ #=============================================================================== # Build object from all test sources -set(L2_SOURCES "hpr2.cpp" "hpmv.cpp" "her.cpp" "her2.cpp" "hemv.cpp" "hbmv.cpp" "geru.cpp" "ger.cpp" "gerc.cpp" "gemv.cpp" "gbmv.cpp" "trsv.cpp" "trmv.cpp" "tpsv.cpp" "tpmv.cpp" "tbsv.cpp" "tbmv.cpp" "syr.cpp" "syr2.cpp" "symv.cpp" "spr.cpp" "spr2.cpp" "spmv.cpp" "sbmv.cpp" "hpr.cpp" "hpr2_usm.cpp" "hpmv_usm.cpp" "her_usm.cpp" "her2_usm.cpp" "hemv_usm.cpp" "hbmv_usm.cpp" "geru_usm.cpp" "ger_usm.cpp" "gerc_usm.cpp" "gemv_usm.cpp" "gbmv_usm.cpp" "trsv_usm.cpp" "trmv_usm.cpp" "tpsv_usm.cpp" "tpmv_usm.cpp" "tbsv_usm.cpp" "tbmv_usm.cpp" "syr_usm.cpp" "syr2_usm.cpp" "symv_usm.cpp" "spr_usm.cpp" "spr2_usm.cpp" "spmv_usm.cpp" "sbmv_usm.cpp" "hpr_usm.cpp") +set(L2_SOURCES_W_CBLAS "hpr2.cpp" "hpmv.cpp" "her.cpp" "her2.cpp" "hemv.cpp" "hbmv.cpp" "geru.cpp" "ger.cpp" "gerc.cpp" "gemv.cpp" "gbmv.cpp" "trsv.cpp" "trmv.cpp" "tpsv.cpp" "tpmv.cpp" "tbsv.cpp" "tbmv.cpp" "syr.cpp" "syr2.cpp" "symv.cpp" "spr.cpp" "spr2.cpp" "spmv.cpp" "sbmv.cpp" "hpr.cpp" "hpr2_usm.cpp" "hpmv_usm.cpp" "her_usm.cpp" "her2_usm.cpp" "hemv_usm.cpp" "hbmv_usm.cpp" "geru_usm.cpp" "ger_usm.cpp" "gerc_usm.cpp" "gemv_usm.cpp" "gbmv_usm.cpp" "trsv_usm.cpp" "trmv_usm.cpp" "tpsv_usm.cpp" "tpmv_usm.cpp" "tbsv_usm.cpp" "tbmv_usm.cpp" "syr_usm.cpp" "syr2_usm.cpp" "symv_usm.cpp" "spr_usm.cpp" "spr2_usm.cpp" "spmv_usm.cpp" "sbmv_usm.cpp" "hpr_usm.cpp") +# TODO: add list of tests without Netlib dependency +set(L2_SOURCES) if(BUILD_SHARED_LIBS) - add_library(blas_level2_rt OBJECT ${L2_SOURCES}) + add_library(blas_level2_rt OBJECT $<$:${L2_SOURCES_W_CBLAS}> ${L2_SOURCES}) target_compile_options(blas_level2_rt PRIVATE -DCALL_RT_API -DNOMINMAX) target_include_directories(blas_level2_rt PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include @@ -29,16 +31,16 @@ if(BUILD_SHARED_LIBS) PUBLIC ${PROJECT_SOURCE_DIR}/include PUBLIC ${PROJECT_SOURCE_DIR}/deps/googletest/include PUBLIC ${CMAKE_BINARY_DIR}/bin - PUBLIC ${CBLAS_INCLUDE} + $<$:${CBLAS_INCLUDE}> ) if (USE_ADD_SYCL_TO_TARGET_INTEGRATION) - add_sycl_to_target(TARGET blas_level2_rt SOURCES ${L2_SOURCES}) + add_sycl_to_target(TARGET blas_level2_rt SOURCES $<$:${L2_SOURCES_W_CBLAS}> ${L2_SOURCES}) else() target_link_libraries(blas_level2_rt PUBLIC ONEMKL::SYCL::SYCL) endif() endif() -add_library(blas_level2_ct OBJECT ${L2_SOURCES}) +add_library(blas_level2_ct OBJECT $<$:${L2_SOURCES_W_CBLAS}> ${L2_SOURCES}) target_compile_options(blas_level2_ct PRIVATE -DNOMINMAX) target_include_directories(blas_level2_ct PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include @@ -46,10 +48,10 @@ target_include_directories(blas_level2_ct PUBLIC ${PROJECT_SOURCE_DIR}/include PUBLIC ${PROJECT_SOURCE_DIR}/deps/googletest/include PUBLIC ${CMAKE_BINARY_DIR}/bin - PUBLIC ${CBLAS_INCLUDE} + $<$:${CBLAS_INCLUDE}> ) if (USE_ADD_SYCL_TO_TARGET_INTEGRATION) - add_sycl_to_target(TARGET blas_level2_ct SOURCES ${L2_SOURCES}) + add_sycl_to_target(TARGET blas_level2_ct SOURCES $<$:${L2_SOURCES_W_CBLAS}> ${L2_SOURCES}) else() target_link_libraries(blas_level2_ct PUBLIC ONEMKL::SYCL::SYCL) endif() diff --git a/tests/unit_tests/blas/level3/CMakeLists.txt b/tests/unit_tests/blas/level3/CMakeLists.txt index 53cba3f4c..652f4413f 100644 --- a/tests/unit_tests/blas/level3/CMakeLists.txt +++ b/tests/unit_tests/blas/level3/CMakeLists.txt @@ -18,10 +18,12 @@ #=============================================================================== # Build object from all test sources -set(L3_SOURCES "gemm.cpp" "symm.cpp" "syrk.cpp" "hemm.cpp" "herk.cpp" "syr2k.cpp" "her2k.cpp" "trmm.cpp" "trsm.cpp" "gemm_usm.cpp" "symm_usm.cpp" "syrk_usm.cpp" "hemm_usm.cpp" "herk_usm.cpp" "syr2k_usm.cpp" "her2k_usm.cpp" "trmm_usm.cpp" "trsm_usm.cpp") +set(L3_SOURCES_W_CBLAS "gemm.cpp" "symm.cpp" "syrk.cpp" "hemm.cpp" "herk.cpp" "syr2k.cpp" "her2k.cpp" "trmm.cpp" "trsm.cpp" "gemm_usm.cpp" "symm_usm.cpp" "syrk_usm.cpp" "hemm_usm.cpp" "herk_usm.cpp" "syr2k_usm.cpp" "her2k_usm.cpp" "trmm_usm.cpp" "trsm_usm.cpp") +# TODO: add list of tests without Netlib dependency +set(L3_SOURCES) if(BUILD_SHARED_LIBS) - add_library(blas_level3_rt OBJECT ${L3_SOURCES}) + add_library(blas_level3_rt OBJECT $<$:${L3_SOURCES_W_CBLAS}> ${L3_SOURCES}) target_compile_options(blas_level3_rt PRIVATE -DCALL_RT_API -DNOMINMAX) target_include_directories(blas_level3_rt PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include @@ -29,16 +31,16 @@ if(BUILD_SHARED_LIBS) PUBLIC ${PROJECT_SOURCE_DIR}/include PUBLIC ${PROJECT_SOURCE_DIR}/deps/googletest/include PUBLIC ${CMAKE_BINARY_DIR}/bin - PUBLIC ${CBLAS_INCLUDE} + $<$:${CBLAS_INCLUDE}> ) if (USE_ADD_SYCL_TO_TARGET_INTEGRATION) - add_sycl_to_target(TARGET blas_level3_rt SOURCES ${L3_SOURCES}) + add_sycl_to_target(TARGET blas_level3_rt SOURCES $<$:${L3_SOURCES_W_CBLAS}> ${L3_SOURCES}) else() target_link_libraries(blas_level3_rt PUBLIC ONEMKL::SYCL::SYCL) endif() endif() -add_library(blas_level3_ct OBJECT ${L3_SOURCES}) +add_library(blas_level3_ct OBJECT $<$:${L3_SOURCES_W_CBLAS}> ${L3_SOURCES}) target_compile_options(blas_level3_ct PRIVATE -DNOMINMAX) target_include_directories(blas_level3_ct PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include @@ -46,10 +48,10 @@ target_include_directories(blas_level3_ct PUBLIC ${PROJECT_SOURCE_DIR}/include PUBLIC ${PROJECT_SOURCE_DIR}/deps/googletest/include PUBLIC ${CMAKE_BINARY_DIR}/bin - PUBLIC ${CBLAS_INCLUDE} + $<$:${CBLAS_INCLUDE}> ) if (USE_ADD_SYCL_TO_TARGET_INTEGRATION) - add_sycl_to_target(TARGET blas_level3_ct SOURCES ${L3_SOURCES}) + add_sycl_to_target(TARGET blas_level3_ct SOURCES $<$:${L3_SOURCES_W_CBLAS}> ${L3_SOURCES}) else() target_link_libraries(blas_level3_ct PUBLIC ONEMKL::SYCL::SYCL) endif() diff --git a/tests/unit_tests/lapack/source/CMakeLists.txt b/tests/unit_tests/lapack/source/CMakeLists.txt index c61403c40..325caf24c 100644 --- a/tests/unit_tests/lapack/source/CMakeLists.txt +++ b/tests/unit_tests/lapack/source/CMakeLists.txt @@ -18,7 +18,7 @@ #=============================================================================== #Build object from all test sources -set(LAPACK_SOURCES +set(LAPACK_SOURCES_W_LAPACKE "gebrd.cpp" "geqrf.cpp" "geqrf_batch_group.cpp" @@ -67,9 +67,11 @@ set(LAPACK_SOURCES "unmrq.cpp" "unmtr.cpp" ) +# TODO: add list of tests without Netlib dependency +set(LAPACK_SOURCES) if(BUILD_SHARED_LIBS) - add_library(lapack_source_rt OBJECT ${LAPACK_SOURCES}) +add_library(lapack_source_rt OBJECT $<$:${LAPACK_SOURCES_W_LAPACKE}> ${LAPACK_SOURCES}) target_compile_options(lapack_source_rt PRIVATE -DCALL_RT_API -DNOMINMAX) target_include_directories(lapack_source_rt PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include @@ -77,12 +79,12 @@ if(BUILD_SHARED_LIBS) PUBLIC ${PROJECT_SOURCE_DIR}/include PUBLIC ${PROJECT_SOURCE_DIR}/deps/googletest/include PUBLIC ${CMAKE_BINARY_DIR}/bin - PUBLIC ${LAPACKE_INCLUDE} + $<$:${LAPACKE_INCLUDE}> ) target_link_libraries(lapack_source_rt PUBLIC ONEMKL::SYCL::SYCL) endif() -add_library(lapack_source_ct OBJECT ${LAPACK_SOURCES}) +add_library(lapack_source_ct OBJECT $<$:${LAPACK_SOURCES_W_LAPACKE}> ${LAPACK_SOURCES}) target_compile_options(lapack_source_ct PRIVATE -DNOMINMAX) target_include_directories(lapack_source_ct PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include @@ -90,6 +92,6 @@ target_include_directories(lapack_source_ct PUBLIC ${PROJECT_SOURCE_DIR}/include PUBLIC ${PROJECT_SOURCE_DIR}/deps/googletest/include PUBLIC ${CMAKE_BINARY_DIR}/bin - PUBLIC ${LAPACKE_INCLUDE} + $<$:${LAPACKE_INCLUDE}> ) target_link_libraries(lapack_source_ct PUBLIC ONEMKL::SYCL::SYCL)