mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-01-18 10:46:28 +00: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
@ -168,6 +168,8 @@ target_include_directories(${TARGET} PUBLIC
|
||||
|
||||
if (MSVC)
|
||||
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()
|
||||
target_link_libraries(${TARGET} PRIVATE m ${WHISPER_EXTRA_LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||
endif()
|
||||
@ -180,10 +182,6 @@ if (BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(${TARGET} PUBLIC
|
||||
WHISPER_SHARED
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
target_compile_definitions(${TARGET} PUBLIC __AVX2__ _CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_compile_definitions(${TARGET} PUBLIC
|
||||
|
Loading…
Reference in New Issue
Block a user