[CMake] Auto-include Clang default include paths in Eclipse CDT
Allan Hasegawa
sirhase at gmail.com
Sun Dec 30 13:24:01 EST 2012
I just made a progress about this issue. The problem where Eclipse CDT
deletes my include paths is not direct related to CMake, because, even a
Eclipse restart results on all my include paths to disappear.
I "solved" it by setting the Eclipse automatic discovery of paths/symbols
command to "/usr/bin/clang++ -E -P -v -dD
${plugin_state_location}/${specs_file} -std=c++11 -stdlib=libc++" then in
"C/C++ Project Paths" -> "Path Containers" I use this discovery. This way,
Eclipse preserves both CMake and default Clang includes/symbols.
Still, may not be a good solution as CMake parsing the clang++ output and
including the paths, but good enough to get my work done..
On Sun, Dec 30, 2012 at 2:05 PM, Alexander Neundorf <a.neundorf-work at gmx.net
> wrote:
> On Wednesday 26 December 2012, Allan Hasegawa wrote:
> > Hello,
> >
> > I'm currently using Linux with the Clang compiler. When CMake asks what
> > compiler/toolchain to use, I specify my compiler manually
> > (/usr/bin/clang++) and the Eclipse CDT Generator...
> >
> > The problem is, when I generate the project for Eclipse CDT, it do not
> set
> > any include paths or predefined symbols, so, Eclipse can not find system
> > libs/headers. I can fix this problem temporary by running the command
> > "clang -v -x c++ -std=c++11 -" and including manually each include path,
> > but, as soon as I change my CMakeLists.txt files, I have to do it all
> > again, as the project configuration seems to be erased when CMake is
> rerun.
> >
> > I could hard-code the include paths in the CMakeLists.txt, but this will
> > break the project for the others people using it. I tried to search for a
> > solution online, and found a post in this list where they mention to look
> > for the Eclipse Generator module, but I do not have this module in my
> > system (CMake 2.8.9).
> >
> > Any ideas how to solve this problem?
>
> Please add a ticket in the cmake bug tracker at
> http://public.kitware.com/Bug
> for this, I'll have a look.
>
> Thanks
> Alex
>
--
Att.,
Allan Yoshio Hasegawa...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121230/57842d59/attachment.htm>
More information about the CMake
mailing list