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

Allan Hasegawa sirhase at gmail.com
Wed Dec 26 14:06:14 EST 2012


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?

Thanks,
Aran...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121226/d8781847/attachment.htm>


More information about the CMake mailing list