importing a cmake project into KF5 kdevelop starts a cmake configure?

Aleix Pol aleixpol at kde.org
Tue Feb 3 00:56:48 GMT 2015


On Mon, Feb 2, 2015 at 6:42 PM, René J.V. <rjvbertin at gmail.com> wrote:
> On Monday February 02 2015 17:48:21 Aleix Pol wrote:
>
>> >> > My problem is that cmake is apparently run even if you point to an already
>> >> > configured build directory. Am I mistaken on that point?
>> >> If that happens, then it's a bug to solve. Please report it and I'll
>> >> look into it.
>> >
>> > Isn't it required nowadays to ensure we get the compile_commands.json file?
>> > I.e. we need to rerun cmake with the proper generator set?
>>
>> Yes.
>> The generator isn't related, just run cmake. Also that's fine, as long
>> as we do it in the right directory.
>
> Aleix, are you now saying it's fine to run cmake in an already configured build directory?
> Can we really be sure that that will only use information already cached in CMakeCache.txt and not introduce/redefine things therein?
> I think that at the very least it should be possible in that case to set the environment in which to execute cmake, and possibly even the cmake executable itself.
Yes, it's ok. In fact cmake gets called rather often anyway. When
building, make/ninja run cmake themselves as well, for example.

>
> Also, do you need that compile_command.json file for loading/parsing the project, and not only for building it? Which a priori is handled through make or ninja?
Yes, compile_command.json is used now to get the includes and defines
for a said file.

Aleix



More information about the KDevelop mailing list