Cmake template-depth problem
Issue #98
resolved
@richardroberts, @cbeall3
@jdong37 and I found the following in gtsam cmake stuff:
# 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)
endif()
endif()
But, this seems wrong: add_definitions is for defines, not compiler flags. The issue is that this adds a C flag also to a fortran compiler (so we’re stuck).
What is the right way to do this?
Major as means we can't compile ransac w 5-point on mac now...
Comments (4)
-
-
I have tested it works on my side, and push the commit. But @cbeall3 do you think we need to test it on Clang since it for Clang? I have just tested it on GCC.
-
Works fine on my Mac with Clang.
-
- changed status to resolved
- Log in to comment
Try replacing the add_definitions line with this: