Spaces:
Running
Running
Kreijstal
commited on
cmake : target windows 8 or above for prefetchVirtualMemory in llama-talk (#1617)
Browse filesSince 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)
examples/talk-llama/CMakeLists.txt
CHANGED
|
@@ -18,6 +18,11 @@ if (WHISPER_SDL2)
|
|
| 18 |
../../ggml-quants.c
|
| 19 |
../../whisper.cpp)
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
target_include_directories(${TARGET} PRIVATE ${SDL2_INCLUDE_DIRS} ../../)
|
| 22 |
target_link_libraries(${TARGET} PRIVATE ${SDL2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
| 23 |
|
|
|
|
| 18 |
../../ggml-quants.c
|
| 19 |
../../whisper.cpp)
|
| 20 |
|
| 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 |
+
|
| 26 |
target_include_directories(${TARGET} PRIVATE ${SDL2_INCLUDE_DIRS} ../../)
|
| 27 |
target_link_libraries(${TARGET} PRIVATE ${SDL2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
| 28 |
|