[CMake] Auto-include Clang default include paths in Eclipse CDT

Alexander Neundorf a.neundorf-work at gmx.net
Sun Dec 30 11:05:31 EST 2012


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


More information about the CMake mailing list