mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-23 18:49:08 +08:00
cmake: show configuration summary
This commit is contained in:
parent
21838b0e7a
commit
3f9bb6626a
@ -184,17 +184,17 @@ foreach(flag ${Vc_ARCHITECTURE_FLAGS})
|
||||
endforeach()
|
||||
|
||||
# add definition as expected in src/arch/simddetect.cpp
|
||||
set(AVX_OPT 0)
|
||||
set(AVX2_OPT 0)
|
||||
set(SSE41_OPT 0)
|
||||
set(MARCH_NATIVE_OPT 0)
|
||||
set(AVX_OPT OFF)
|
||||
set(AVX2_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(sim_flags "${sim_flags} -D${flag}")
|
||||
string(REPLACE "_" "" flag "${flag}")
|
||||
if("${flag}" MATCHES "AVX|AVX2|SSE41")
|
||||
set("${flag}_OPT" 1)
|
||||
set("${flag}_OPT" ON)
|
||||
endif()
|
||||
endforeach(flag)
|
||||
FILE(GLOB arch_files "src/arch/*.cpp")
|
||||
@ -204,7 +204,7 @@ CHECK_CXX_COMPILER_FLAG("-march=native" COMPILER_SUPPORTS_MARCH_NATIVE)
|
||||
if(COMPILER_SUPPORTS_MARCH_NATIVE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native")
|
||||
set_source_files_properties(src/arch/dotproduct.cpp PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS} -O3 -ffast-math")
|
||||
set(MARCH_NATIVE_OPT 1)
|
||||
set(MARCH_NATIVE_OPT ON)
|
||||
endif()
|
||||
|
||||
set(AUTOCONFIG_SRC ${CMAKE_CURRENT_BINARY_DIR}/config_auto.h.in)
|
||||
@ -237,6 +237,33 @@ configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/TesseractConfig.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/TesseractConfig.cmake @ONLY)
|
||||
|
||||
# show summary of configuration
|
||||
message( STATUS )
|
||||
message( STATUS "General configuration for Tesseract ${PACKAGE_VERSION}")
|
||||
message( STATUS "--------------------------------------------------------")
|
||||
message( STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
||||
message( STATUS "Compiler: ${CMAKE_CXX_COMPILER_ID}")
|
||||
message( STATUS "CXX compiler options: ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UP}} ${CMAKE_CXX_FLAGS}")
|
||||
message( STATUS "Linker options: ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UP}}")
|
||||
message( STATUS "Install directory: ${CMAKE_INSTALL_PREFIX}")
|
||||
message( STATUS "Architecture flags: ${Vc_ARCHITECTURE_FLAGS}")
|
||||
message( STATUS "Vector unit list: ${_enable_vector_unit_list}")
|
||||
message( STATUS "AVX_OPT: ${AVX_OPT}")
|
||||
message( STATUS "AVX2_OPT: ${AVX2_OPT}")
|
||||
message( STATUS "SSE41_OPT: ${SSE41_OPT}")
|
||||
message( STATUS "MARCH_NATIVE_OPT: ${MARCH_NATIVE_OPT}")
|
||||
message( STATUS "sim_flags: ${sim_flags}")
|
||||
message( STATUS )
|
||||
message( STATUS "Build with cppan [CPPAN_BUILD]: ${CPPAN_BUILD}")
|
||||
message( STATUS "Build with openmp support [OPENMP_BUILD]: ${OPENMP_BUILD}")
|
||||
message( STATUS "Disable disable graphics (ScrollView) [GRAPHICS_DISABLED]: ${GRAPHICS_DISABLED}")
|
||||
message( STATUS "Enable embedded build [EMBEDDED]: ${EMBEDDED}")
|
||||
message( STATUS "Disable the legacy OCR engine [DISABLED_LEGACY_ENGINE]: ${DISABLED_LEGACY_ENGINE}")
|
||||
message( STATUS "Build training tools [BUILD_TRAINING_TOOLS]: ${BUILD_TRAINING_TOOLS}")
|
||||
message( STATUS "Build tests [BUILD_TESTS]: ${BUILD_TESTS}")
|
||||
message( STATUS "--------------------------------------------------------")
|
||||
message( STATUS )
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# build
|
||||
|
Loading…
Reference in New Issue
Block a user