[Patch] cmake additional arguments support

Kishore kitts.mailinglists at gmail.com
Sat Jul 11 21:31:43 UTC 2009


On Saturday 11 Jul 2009 6:57:22 pm Andreas Pakulat wrote:
> On 10.07.09 16:44:04, Kishore wrote:
> > On Friday 10 Jul 2009 4:10:17 pm Andreas Pakulat wrote:
> > > On 10.07.09 15:43:36, Kishore wrote:
> > > > On Friday 10 Jul 2009 1:38:03 pm Vladimir Prus wrote:
> > > > > On Friday 10 July 2009 Kishore wrote:
> > > > > I am not exactly sure about dialog -- that
> > > > > combo appears to only select what settings you want to edit -- it
> > > > > does not change how the launch configuration is launched -- you
> > > > > pick the relevant item from the menu. However, it's a bit confusing
> > > > > to myself, too. Andreas, can you clarify what this combobox is
> > > > > supposed to mean?
> > > >
> > > > If the combobox in the dialog is meant to "create" the tab below it.
> > > > would it not be better to have them as tabs that always exist and
> > > > just discard the "Launch Mode" combobox?
> > >
> > > Well, IMHO its not so nice to have 8 tabs there just because there are
> > > 8 possible launch modes. And eventually even more if there are more
> > > launchers for a given launchmode (think of integrating gdb+msvc-debug
> > > on win32 for Debugging native apps). Thats why the tabs are
> > > added/removed based on the launchmode.
> >
> > Hmmm... Too many tabs is not very nice but it does seem more intuitive.
>
> Yeah, but using tabs for the mode would mean having nested tabs as one
> lauch mode can possibly supply multiple pages. For example the valgrind
> modes will all supply a generic setup page for the valgrind executable
> and some general parameters and then invidiual pages for the specific
> backend.
>
> > I take this as "the way it
> > is meant to be" for launchers. i.e. you cannot have GDB and another
> > configured in the same launch config. I am not sure about this last bit
> > but i see no way to allowing the user to choose the different debug
> > launches from the menu. Are there going to be submenus to the Debug
> > action?
>
> Well, if it makes sense to have two different Debug-Actions on the same
> launch config then you could have two in a submenu. For example in the
> valgrind case it doesn't make much sense to have just a "Profile" action
> and then have to choose/switch the actually used profiler (memory,
> threads, function-calls etc) every time. Hence each profiles has its own
> launch mode. I could for example imagine that remote-gdb for embedded
> targets could provide its own launch-mode due to vastly differing setup,
> but still being a Debug-Launchmode.
>
> > > Not sure what you mean with that. Opening a cmake project asks you
> > > already for the builddir for that project. If you have multiple
> > > builddirs you can configure them via Project->Project
> > > Configuration...->CMake and switch the active one there.
> >
> > At least for embedded systems, there is more configuration needed for
> > cmake. If you look through the official cmake-gui application, you will
> > see that it offers more options. When cross compiling it allows you to
> > set the compiler either directly or by specifying a CMAKE_TOOLCHAIN_FILE.
> > At the very least i think that the cmake support should provide a line
> > edit that the user can use to specify additional options to the cmake
> > executable.
>
> Definetly needed yes. I also pass various custom options to the
> commandline.
>
> > I tried looking through the code for this but could not find where the
> > cmake executable is executed.
>
> Its in kdevelop/projectmanagers/cmake/cmakebuilddirchooser*, shouldn't
> be too hard to add a line-edit there. You just need to store the content
> of that into the project configuration (similar to the buildtype) and
> then adjust the cmakebuilder in kdevelop/projectbuilders/cmakebuilder to
> read the value and use it (see the configure() method of the class)
>
> Andreas

I have tried to add additional arguments support in the attached patch. It 
seemed to me that in the current state kdevelop was never really using the 
data provided by the user when he adds a build dir. The attached patch also 
saves user settings and uses them during configuration stage. I am not sure if 
it is the right approach that i take to when saving configuration.
-- 
Cheers!
Kishore
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake_additional_args.diff
Type: text/x-patch
Size: 13506 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090712/ea2e821b/attachment.diff>


More information about the KDevelop-devel mailing list