[CMake] Problems C/C++ system headers and Eclipse Generator

Philip Lowman philip at yhbt.com
Mon Jun 8 22:20:19 EDT 2009


On Mon, Jun 8, 2009 at 5:28 PM, Stefan Dröge <stefan at sdroege.de> wrote:

> 2009/6/8 Andreas Pakulat <apaku at gmx.de>:
> > Thats not really a bug, adding translation support for such compiler
> > messages in code that tries to parse that output is insane (at least
> > without the compiler offering a way to backtranslate its messages). In
> > KDevelop3 we're having the same problem and there you have the choice of
> > either getting nicely formatted (and shortened) compiler output or
> > translated messages, but not both at the same time.
> >
> > Andreas
>
> I don't think you need to add translation support for the parser. In
> this particular case the user never gets to see the output of gcc. As
> I understand it, it is only executed, if you configure your project
> with CMake, to find out the standard system header paths.


Yes, that is the only reason.

Can you try the CMakeFindEclipseCDT4.cmake attached to this bug report? I've
wrapped the call to EXECUTE_PROCESS by saving the LANG environment variable
and then setting it to "C", and restoring it after running gcc.  I'm not
entirely sure if this is the right thing to do as I'm not really experienced
with locales at all.

http://public.kitware.com/Bug/view.php?id=9122

You can test the script by putting the following in your code:
message("C system include dirs = ${CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS}")
message("C++ system include dirs =
${CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS}")

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090608/ae5bf76a/attachment.htm>


More information about the CMake mailing list