Remove -ftemplate-depth for apple with clang < 5.0.

release/4.3a0
Thomas Schneider 2015-04-09 14:01:16 +02:00
parent ff504807d8
commit 279751c7a2
1 changed files with 5 additions and 2 deletions

View File

@ -53,9 +53,12 @@ if(NOT FIRST_PASS_DONE)
endif()
endif()
# Clang on Mac uses a template depth that is less than standard and is too small
# Clang uses a template depth that is less than standard and is too small
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
# Apple Clang before 5.0 does not support -ftemplate-depth.
if(NOT (APPLE AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "5.0"))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
endif()
endif()
# Set up build type library postfixes