change cmake option into correct way: use set CMAKE_CXX_FLAGS replace add_definition

release/4.3a0
jing 2014-05-25 20:09:49 -04:00
parent 499f2f2918
commit 020d2e43f8
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ endif()
# Clang on Mac uses a template depth that is less than standard and is too small
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if(NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "5.0")
add_definitions(-ftemplate-depth=1024)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
endif()
endif()