mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-01-27 08:18:55 +01:00
ref #5 : update CMake for Windows build
- __AVX2__ should already be defined due to /arch:AVX2 - _CRT_SECURE_NO_WARNINGS should be defined both for shared and static lib
This commit is contained in:
parent
014a119052
commit
234f414652
@ -167,9 +167,11 @@ target_include_directories(${TARGET} PUBLIC
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_link_libraries(${TARGET} PRIVATE ${WHISPER_EXTRA_LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(${TARGET} PRIVATE ${WHISPER_EXTRA_LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
|
set(WHISPER_EXTRA_FLAGS ${WHISPER_EXTRA_FLAGS} -D_CRT_SECURE_NO_WARNINGS)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(${TARGET} PRIVATE m ${WHISPER_EXTRA_LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(${TARGET} PRIVATE m ${WHISPER_EXTRA_LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
@ -180,10 +182,6 @@ if (BUILD_SHARED_LIBS)
|
|||||||
target_compile_definitions(${TARGET} PUBLIC
|
target_compile_definitions(${TARGET} PUBLIC
|
||||||
WHISPER_SHARED
|
WHISPER_SHARED
|
||||||
)
|
)
|
||||||
|
|
||||||
if (MSVC)
|
|
||||||
target_compile_definitions(${TARGET} PUBLIC __AVX2__ _CRT_SECURE_NO_WARNINGS)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_compile_definitions(${TARGET} PUBLIC
|
target_compile_definitions(${TARGET} PUBLIC
|
||||||
|
Loading…
Reference in New Issue
Block a user