mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Increase template-depth for Clang only when needed
Clang 7 increased the default template-depth to 1024.
This commit is contained in:
parent
4ebf3ef088
commit
04371157f7
@ -131,8 +131,9 @@ if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
list(APPEND active_compile_opts "-Wreturn-type")
|
||||
endif()
|
||||
|
||||
if ("Clang" MATCHES ${CMAKE_CXX_COMPILER_ID})
|
||||
# Increase clang's default tempalte recurision depth so the dnn examples don't error out.
|
||||
if ("Clang" MATCHES ${CMAKE_CXX_COMPILER_ID} AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)
|
||||
# Clang 6 had a default template recursion depth of 256. This was changed to 1024 in Clang 7.
|
||||
# It must be increased on Clang 6 and below to ensure that the dnn examples don't error out.
|
||||
list(APPEND active_compile_opts "-ftemplate-depth=500")
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user