mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-27 12:49:35 +08:00
cmake: fix build type flags
This commit is contained in:
parent
d6aa866430
commit
21680fa75b
@ -128,7 +128,8 @@ elseif(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Wall /bigobj")
|
||||
elseif(CLANG)
|
||||
endif()
|
||||
if(CLANG) # clang all platforms
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wno-unused-command-line-argument")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -DDEBUG -pedantic -O0")
|
||||
endif()
|
||||
@ -274,13 +275,18 @@ configure_file(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/TesseractConfig.cmake @ONLY)
|
||||
|
||||
# show summary of configuration
|
||||
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
|
||||
set(COMPILER_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
elseif(${CMAKE_BUILD_TYPE} MATCHES Release)
|
||||
set(COMPILER_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
endif()
|
||||
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 "Used standard: C++${CMAKE_CXX_STANDARD}")
|
||||
message( STATUS "CXX compiler options: ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UP}} ${CMAKE_CXX_FLAGS}")
|
||||
message( STATUS "CXX compiler options: ${COMPILER_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}")
|
||||
|
Loading…
Reference in New Issue
Block a user