|
|
@ -1,44 +1,18 @@ |
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
@@ -224,41 +224,6 @@ set(tesseract_src ${tesseract_src}
|
|
|
|
src/api/pdfrenderer.cpp |
|
|
|
) |
|
|
|
|
|
|
|
-if (WIN32)
|
|
|
|
- if (MSVC)
|
|
|
|
- include_directories(src/vs2010/tesseract)
|
|
|
|
- set(tesseract_hdr
|
|
|
|
- ${tesseract_hdr}
|
|
|
|
- ${CMAKE_CURRENT_SOURCE_DIR}/src/vs2010/tesseract/resource.h)
|
|
|
|
- set(tesseract_rsc ${CMAKE_BINARY_DIR}/vs2010/tesseract/libtesseract.rc)
|
|
|
|
- set_source_files_properties(
|
|
|
|
- ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductsse.cpp
|
|
|
|
- PROPERTIES COMPILE_DEFINITIONS __SSE4_1__)
|
|
|
|
- set_source_files_properties(
|
|
|
|
- ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixsse.cpp
|
|
|
|
- PROPERTIES COMPILE_DEFINITIONS __SSE4_1__)
|
|
|
|
- set_source_files_properties(
|
|
|
|
- ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductavx.cpp
|
|
|
|
- PROPERTIES COMPILE_FLAGS "/arch:AVX")
|
|
|
|
- set_source_files_properties(
|
|
|
|
- ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixavx2.cpp
|
|
|
|
- PROPERTIES COMPILE_FLAGS "/arch:AVX2")
|
|
|
|
@@ -252,15 +252,6 @@ set(AVX2_OPT OFF)
|
|
|
|
set(FMA_OPT OFF) |
|
|
|
set(SSE41_OPT OFF) |
|
|
|
set(MARCH_NATIVE_OPT OFF) |
|
|
|
-foreach(flag ${_enable_vector_unit_list}) # from OptimizeForArchitecture()
|
|
|
|
- string(TOUPPER "${flag}" flag)
|
|
|
|
- string(REPLACE "\." "_" flag "${flag}")
|
|
|
|
- set(simd_flags "${simd_flags} -D${flag}")
|
|
|
|
- string(REPLACE "_" "" flag "${flag}")
|
|
|
|
- if("${flag}" MATCHES "AVX|AVX2|FMA|SSE41")
|
|
|
|
- set("${flag}_OPT" ON)
|
|
|
|
- endif()
|
|
|
|
-else()
|
|
|
|
- set_source_files_properties(
|
|
|
|
- ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductsse.cpp
|
|
|
|
- PROPERTIES COMPILE_FLAGS "-msse4.1")
|
|
|
|
- set_source_files_properties(
|
|
|
|
- ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixsse.cpp
|
|
|
|
- PROPERTIES COMPILE_FLAGS "-msse4.1")
|
|
|
|
- set_source_files_properties(
|
|
|
|
- ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductavx.cpp
|
|
|
|
- PROPERTIES COMPILE_FLAGS "-mavx")
|
|
|
|
- set_source_files_properties(
|
|
|
|
- ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixavx2.cpp
|
|
|
|
- PROPERTIES COMPILE_FLAGS "-mavx2")
|
|
|
|
-endif()
|
|
|
|
-
|
|
|
|
add_library (libtesseract ${LIBRARY_TYPE} ${tesseract_src} ${tesseract_hdr} |
|
|
|
${tesseract_rsc} |
|
|
|
) |
|
|
|
-endforeach(flag)
|
|
|
|
if (NOT MSVC) |
|
|
|
set(MARCH_NATIVE_FLAGS "${MARCH_NATIVE_FLAGS} -O3 -ffast-math") |
|
|
|
endif() |