Skip to content

Commit 37fede7

Browse files
committed
Add CMake configuration to use Visual Studio project to build ggml-sycl
1 parent 5d01670 commit 37fede7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ggml/src/ggml-sycl/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ target_sources(ggml-sycl PRIVATE ${GGML_HEADERS_SYCL} ${GGML_SOURCES_SYCL})
8282

8383

8484
if (WIN32)
85+
if( ${CMAKE_GENERATOR} MATCHES "Visual Studio" AND NOT (${CMAKE_GENERATOR_TOOLSET} MATCHES "Intel C"))
86+
set_target_properties(ggml-sycl PROPERTIES VS_PLATFORM_TOOLSET "Intel C++ Compiler 2025")
87+
set(CMAKE_CXX_COMPILER "icx")
88+
set(CMAKE_CXX_COMPILER_ID "IntelLLVM")
89+
endif()
8590
find_package(IntelSYCL REQUIRED)
8691
find_package(MKL REQUIRED)
8792
target_link_libraries(ggml-sycl PRIVATE IntelSYCL::SYCL_CXX MKL::MKL MKL::MKL_SYCL)

0 commit comments

Comments
 (0)