Compile current file only (cmake project)

Andreas Pakulat apaku at gmx.de
Thu Nov 8 15:56:10 GMT 2012


Hi,

On Thu, Nov 8, 2012 at 3:04 PM, Mateusz Loskot <mateusz at loskot.net> wrote:
> On 8 November 2012 13:43, Michael Hart <michael.george.hart at gmail.com> wrote:
>> I can see the general advantages of this method building a selected set of
>> files of a project. But, most people don't need such a general mechanism;
>> most people only want to focus on a single file....
>
> If I may, as a user, I'd reason this way:
> There are distinct commands to compile a single file or a build a
> binary from command line,
> so I bet most users would expect to have similar commands exposed by a
> GUI based IDE.

One of the reasons there's no easier way in the GUI is that this is
hardly ever needed by our users as far as I know. Of course my brain
may fail me and I don't know about more recent bugreports, but this
has not come up more than once a year maybe in the past. It seems most
people are just fine putting their whole project or a subfolder in the
list or simply empty out the list and use whatever is selected.

I personally would never use a compile-file action since I never work
on projects that are simple enough to make this useful. I always want
to build at least a complete target, if not multiple targets. OTOH the
projects I build are not that large that a simple make without changes
takes long enough for me to be bothered.

>> It has take me almost a year, thanks to your recent comments in this thread, to now
>> know how to compile a single file....
>>
>> shhhhhh!!! what a pain....
>
> It's been almst a year now, and I still haven't managed [0] to understand
> correct and robust CMake workflow in kdevelop juggling
> multiple build configurations and destinations for a single project,
> when I need to hit (re)configure in kdevelop,
> if/when I need to purge CMakeCache.txt,
> what are limitations comparing with command line.
> IOW, how to translate typical CMake workflow on Unix to kdevelop.
>
> Some readings [1] really confuse the matter:

First of all, don't expect articles posted 4 years ago to still match
reality, in particular not the workflow to create projects. There's no
direct contact with the cache-file anymore.

> "After clicking “Ok” KDevelop will read and parse the CMakeCache.txt file and
> show its contents. You can edit it here if you want to."
>
> Hmm, CMakeCache.txt?! Edit it?!

I'm not sure I understand what you're hinting at, but if you don't
know what CMakeCache.txt is then you've either not yet looked up a
cmake tutorial or have selected the wrong buildsystem for your
project. KDevelop does not intend to take away the joy of getting to
know your buildsystem, its more or less a pre-requisite to have some
basic understanding of the buildsystem you're using in your projects.

Andreas




More information about the KDevelop mailing list