[CMake] *Updated* Eclipse CDT4 CMake Generator - Pre-Alpha version

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Wed Aug 1 07:46:10 EDT 2007


On 7/31/07, Bill Hoffman wrote:
> Alexander Neundorf wrote:
> >
> >> I did run into the following annoyance, but it is rather another
> >> topic. When I compile the CMake code in Eclipse using the cygwin
> >> tools, then the resulting Eclipse project files are broken. This is
> >> due to the fact that it creates the .project file with the cygwin
> >> cmake (posix paths) and the Eclipse is installed in a Windows
> >> environment un-aware of where /builds is...
> >>
> >
> > So the easiest way to "solve" this problem would be to disable the Eclipse
> > generator in cmake under Cygwin.
> >
> That is the only way to fix it.  (And it is the reason that Visual
> studio is not included in the cygwin
> build of cmake.)
>
> -Bill

I fixed this using the following code:

std::string
cmExtraEclipseCDT4Generator::GetEclipsePath(const std::string& path) const
{
#if defined(__CYGWIN__)
  std::string cmd = "cygpath -w " + path;
  std::string out;
  if (!cmSystemTools::RunCommand(cmd.c_str(), out, 0, false))
    {
    return path;
    }
  else
    {
    out.erase(out.find_last_of('\n'));
    return out;
    }
#else
  return path;
#endif
}

Now the question is whether this is acceptable? I don't see why it
wouldn't, but I might be missing something.

On 8/1/07, Eric Noulard wrote:
> 2007/8/1, Miguel A. Figueroa-Villanueva:
> > Update patch and source.
>
> May be you can upload your patch on the Wiki when
> you update it?
>
> http://www.cmake.org/Wiki/Eclipse_CDT4_Generator_Development

I have uploaded the latest patch with the above fix to the Wiki page.

Alex, is this ok? Or should I also send it to the list?

--Miguel


More information about the CMake mailing list