[CMake] Eclipse generator - scanner-discovered include pathsand pre-processor symbols

Alexander Neundorf a.neundorf-work at gmx.net
Sun Mar 27 12:24:04 EDT 2011


On Friday 25 March 2011, Chatterjee, Shash wrote:
> Hi Alex,
>
> >- CMakeFindEclipseCDT4.cmake : this is slightly changed version from the
> > one shipped with cmake 2.8.4, it produces debug output. Please replace
> > the CMakeFindEclipseCDT4.cmake in your cmake 2.8.4 installation with this
> > file. Then create a fresh and empty build directory, and let cmake run
> > there, with the same command line as you posted. Capture the output, both
> > stdout and stderr in a log file and post it here.
>
> Thanks for sending this, most illuminating :-)
>
> >I saw that you are using ccache, maybe this behaves slightly different for
> >some things ?
>
> I am using Fedora Core 14, with all latest yum updates.  I have not done
> anything knowingly for cmake to prefer ccache over gcc directly, so looks
> like by default cmake will use ccache over straight GCC if it finds it.  Of
> course, the speedup is most welcome.
>
> I have attached two versions of the log output.   The first one is with the
> problem reproduced.
>
> I noticed in your debug output that the C compiler was being detected as
> blank, and no C++ include directories were being found even though the
> compiler was detected as "GNU".  I changed the project definition in my
> CMakeLists.txt from "project ( eclipsetest CXX ) " to "project ( eclipstest
> C CXX ) " and everything worked as expected.

Ah, indeed, it was using CMAKE_C_COMPILER also when finding out the C++ stuff, 
which works, but only if CMAKE_C_COMPILER is actually set.
Please try the attached version, this should also work with your CXX-only 
project.
Let me know whether it works for you.

Thanks
Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMakeFindEclipseCDT4.cmake
Type: text/x-objcsrc
Size: 6144 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110327/e0e554e7/attachment.bin>


More information about the CMake mailing list