Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-user] eclipse PTP + cmake ( + synchronized projects)

Hi Roland,

I would run CMake in the command line on the remote machine, as follows:

cmake -G "Eclipse CDT4 - Unix Makefiles"

This generates a Makefile project that can be imported in Eclipse.
Then, in eclipse you can import a remote Makefile project. The
underlying  mechanisms to build a remote project in eclipse should
work transparently, e.g., "Build Project" should actually send the
commands to the remote machine.

I haven't actually tried this, but that's how I would expect it would
work. I'd be interested to hear on your experience if you get to try
this out.

Cheers,
George


On Thu, Feb 23, 2012 at 10:48 AM, Roland Schulz <roland@xxxxxxx> wrote:
> Hi George,
>
> would you suggest to the user to run the cmake gui on the remote machine
> using e.g. X-forwarding? Because as far as I can see it is not possible to
> run cmake locally and then use that project to compile remotely. It would be
> very nice if one could execute cmake remotely (running the tests and so on)
> but show the gui locally. Do you have something in cmake-gui which would
> make that possible (e.g. by running the tests over an ssh connection)?
>
> Roland
>
> On Mon, Feb 20, 2012 at 6:27 PM, George Zagaris <george.zagaris@xxxxxxxxxxx>
> wrote:
>>
>> Hello,
>>
>> Alternatively, you can try using one of the CMake project generators.
>> Eclipse support was added in recent CMake versions. Checkout the
>> "cmake -G" flag. I exclusively use eclipse for development and love
>> its parallel debugging capabilities for MPI applications. I have been
>> very happy with being able to import eclipse projects generated by the
>> CMake Eclipse generator. The main advantage of this approach is that
>> you can build your project within the Eclipse IDE without switching to
>> a terminal which is what I used to do for a long time.
>>
>> Hope this helps!
>>
>> Best,
>> George
>>
>> On Sat, Feb 18, 2012 at 5:23 PM, Jeffrey Overbey <jeffreyoverbey@xxxxxxx>
>> wrote:
>> > Hi Christoph,
>> >
>> >
>> >> offered the choice of Makefile Project, GNU Autotools, ...
>> >> ...
>> >> Which should I choose ? None of the choices appears to be a 100% fit.
>> >
>> > I'm not that familiar with CMake, but I can give you some general
>> > guidelines.  A "makefile project" doesn't necessarily have to call make;
>> > it
>> > just means that some external tool will be used to build the project.
>> >  So,
>> > you can swap out the "make" command for a different build command like
>> > this.
>> >
>> > In the wizard to convert to a C/C++ project, choose Makefile Project for
>> > the
>> > project type.
>> > Then, open the project properties.
>> > In the C/C++ Build category (under the Builder Settings tab), uncheck
>> > "Use
>> > default build command" and change the build command from "make" to
>> > "cmake"
>> > (or "cmake src" or whatever it should be).
>> > Still in the C/C++ Build category, switch to the "Behavior" tab.  The
>> > "Make
>> > build targets" here will be appended to the build command depending on
>> > the
>> > type of build.  So, right now it would execute "cmake all" and "cmake
>> > clean"
>> > for incremental and clean builds, respectively.  Presumably that's not
>> > what
>> > you want, so change "all" and "clean" to whatever's appropriate. You can
>> > leave those text boxes blank, in fact, but make sure that the check
>> > boxes
>> > next to them remain checked.
>> >
>> >
>> > Of course, now "make" isn't getting run anymore -- just cmake.  And (as
>> > far
>> > as I know) only one build command is supported, so there's no way to
>> > trick
>> > CDT into executing something like "cmake && gmake".  To do that, you
>> > would
>> > probably want to write a shell script/Windows batch file.  Then, you
>> > could
>> > change your build command to "bash my_build_script.sh" or
>> > "my_build_script.bat" using the same procedure.
>> >
>> > HTH
>> >
>> > Jeff
>> >
>> > _______________________________________________
>> > ptp-user mailing list
>> > ptp-user@xxxxxxxxxxx
>> > https://dev.eclipse.org/mailman/listinfo/ptp-user
>> >
>> _______________________________________________
>> ptp-user mailing list
>> ptp-user@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/ptp-user
>>
>>
>>
>>
>
>
>
> --
> ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
> 865-241-1537, ORNL PO BOX 2008 MS6309


Back to the top