mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-28 05:39:35 +08:00
commit
36985fcc03
@ -198,44 +198,25 @@ endif(NOT APPLE)
|
||||
|
||||
if(MSVC)
|
||||
if(NOT HAVE_AVX)
|
||||
CHECK_CXX_COMPILER_FLAG("/arch:AVX" HAVE_AVX_MSVC)
|
||||
if(HAVE_AVX_MSVC)
|
||||
set(AVX_COMPILE_FLAGS "/arch:AVX")
|
||||
set(HAVE_AVX ON)
|
||||
add_definitions("-DHAVE_AVX")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT HAVE_AVX2)
|
||||
CHECK_CXX_COMPILER_FLAG("/arch:AVX2" HAVE_AVX2_MSVC)
|
||||
if(HAVE_AVX2_MSVC)
|
||||
set(AVX2_COMPILE_FLAGS "/arch:AVX2")
|
||||
set(HAVE_AVX2 ON)
|
||||
add_definitions("-DHAVE_AVX2")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT HAVE_FMA)
|
||||
CHECK_CXX_COMPILER_FLAG("/arch:FMA" HAVE_FMA_MSVC)
|
||||
if(HAVE_FMA_MSVC)
|
||||
set(FMA_COMPILE_FLAGS "/arch:FMA -D__FMA__")
|
||||
set(FMA_COMPILE_FLAGS "-D__FMA__")
|
||||
set(HAVE_FMA ON)
|
||||
add_definitions("-DHAVE_FMA")
|
||||
endif()
|
||||
else() # clanc-cl / MSVC does not define __FMA__
|
||||
set(FMA_COMPILE_FLAGS "${FMA_COMPILE_FLAGS} -D__FMA__")
|
||||
endif()
|
||||
|
||||
if(NOT HAVE_SSE4_1)
|
||||
CHECK_CXX_COMPILER_FLAG("/arch:SSE4.1" HAVE_SSE4_1_MSVC)
|
||||
if(HAVE_SSE4_1_MSVC)
|
||||
set(SSE4_1_COMPILE_FLAGS "/arch:SSE4.1 -D__SSE4_1__")
|
||||
set(SSE4_1_COMPILE_FLAGS "-D__SSE4_1__")
|
||||
set(HAVE_SSE4_1 ON)
|
||||
add_definitions("-DHAVE_SSE4_1")
|
||||
endif()
|
||||
else() # clanc-cl / MSVC does not define __SSE4_1__
|
||||
set(SSE4_1_COMPILE_FLAGS "${SSE4_1_COMPILE_FLAGS} -D__SSE4_1__")
|
||||
endif()
|
||||
endif(MSVC)
|
||||
|
||||
# auto optimize - used only for information about available vectors
|
||||
|
Loading…
Reference in New Issue
Block a user