mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-21 00:20:45 +08:00
Merge pull request #3036 from xuzhen/master
Fixed CMakeLists.txt for the compilers without C++17 support
This commit is contained in:
commit
d17ec2c754
@ -118,6 +118,13 @@ else() # minimum required standard
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
endif()
|
||||
|
||||
if ("${CMAKE_CXX17_STANDARD_COMPILE_OPTION}" STREQUAL "")
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
endif()
|
||||
if ("${CMAKE_CXX14_STANDARD_COMPILE_OPTION}" STREQUAL "")
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
endif()
|
||||
|
||||
# Avoid using experimental c++1y (c++1z) standard even if the compiler announces cxx14 (cxx17)
|
||||
# in CMAKE_CXX_KNOWN_FEATURES and CMAKE_CXX_COMPILE_FEATURES
|
||||
# It is the case of clang 3.9, 4.0 (announces c++1z) and gcc 4.8 (announces c++1y)
|
||||
|
Loading…
Reference in New Issue
Block a user