I'm trying to do it in a similar way to Stefanct, but it doesn't work for me. So far, only the command line option works, as per how William described it.
By the time catkin_make
gets to the set
command in my CMakeList.txt file, its already chosen to use /usr/bin/cc and /usr/bin/c++ and gives an error c++: error: unrecognized command line option ‘-stdlib=libc++’
when I try to perform set(CMAKE_CXX_FLAGS "-v -std=c++11 -stdlib=libc++")
.
I set the flag in a slightly different way; by checking if clang is available before setting it.
find_program(CLANGPP clang++ HINTS /usr/local/bin /usr/bin /opt/local/bin)
if(${CLANGPP} MATCHES "clang")
set(CXX ${CLANGPP})
set(MAKE_CXX_COMPILER ${CLANGPP})
message(STATUS "CXX = ${CXX}")
endif(${CLANGPP} MATCHES "clang")
and the same for 'clang'.
I'm still trying different things, and when I get it working, I'll come back.
@stefanct, where in your CMakeList.txt file do you put those lines? Do you have an initialisation function?
Just curious - is this to get around the bug in clang that prevents PCL from building?
@Dan Lazewatsky: Indeed it is. I'm thinking building the whole thing with the gcc kit (or at least PCL and friends) will be the easy way!
Awesome. I'm excited to see how it work out!
Sure, will let you know. ;)
@Dan Lazewatsky: Okay, there seems to be problems with the generators! They're returnin HTTP 500 errors now (desktop and desktop-full rather).