Skip to content

Commit 15a0088

Browse files
KreijstaliThalay
authored andcommitted
cmake : target windows 8 or above for prefetchVirtualMemory in llama-talk (ggml-org#1617)
Since we use prefetchVirtualMemory we specify we target win 8 or above, otherwise other compilers will refuse to use the prefetchVirtualMemory api, (I understand you are loading it dynamically but the header definition has this limitation)
1 parent ba806b4 commit 15a0088

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/talk-llama/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ if (WHISPER_SDL2)
1818
../../ggml-quants.c
1919
../../whisper.cpp)
2020

21+
if(WIN32)
22+
# It requires Windows 8.1 or later for PrefetchVirtualMemory
23+
target_compile_definitions(${TARGET} PRIVATE -D_WIN32_WINNT=0x0602)
24+
endif()
25+
2126
target_include_directories(${TARGET} PRIVATE ${SDL2_INCLUDE_DIRS} ../../)
2227
target_link_libraries(${TARGET} PRIVATE ${SDL2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
2328

0 commit comments

Comments
 (0)