[Qt-creator] [External] Re: Shared project settings for CMake project

Toralf Lund toralf.lund at pgs.com
Fri Mar 29 14:50:22 CET 2019

On 29/03/2019 13:50, Tobias Hunger wrote:
> Hi Toralf,
> On Fri, 2019-03-29 at 11:29 +0100, Toralf Lund wrote:
>> Is there a way to share Qt Creator project settings when working on a
>> CMake project? I'm thinking about something like what's described for
>> QMake projects in
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__doc.qt.io_qtcreator_creator-2Dsharing-2Dproject-2Dsettings.html&d=DwIGaQ&c=KV_I7O14pmwRcmAVyJ1eg4Jwb8Y2JAxuL5YgMGHpjcQ&r=Q0oqxzgUp3xCCIiJDwS-RbNDndQ-KZDhj8wwveNoqU4&m=zMWEnFRNeTynEsP3Jpoo3y7BXuJK2fVB-biJXg3MNZo&s=Vp47hdqTQ_eK9z_W0duoDNSrcsH7E97LIJ_f1sCVxmc&e=. The
>> idea would be to check the "shared" config into a GIT repository.
>> It looks like the CMake equivalent to a .pro.user file is
>> CMakeLists.txt.user, so you might think CMakeList.txt.share would have
>> the same role as the .pro.shared file. I tried creating such a file,
>> though, and as far as I could tell, it was not read at start-up.
> It *should* be read, but many settings are not easily transferable between
> different Qt Creator instances and these tend to get silently dropped.


What exactly would be the reasons why the changes aren't transferable? I 
mean, you'd think that typical build settings shouldn't be that closely 
tied to an exact instance. If you are using a custom kit, obviously it 
must exist on all systems, but that can be arranged

> Basically anything with a UUID in the path to the setting will not work anywhere
> but no your own machine. This effects everything below a Kit/Target, incl. all
> Build-/Deploy- and RunConfigurations.

What mean by UUID in the path and below Kit/Target? I do see 
<variable>ProjectExplorer.Project.Target.0</variable> and <value 
Is that what you're referring to?

I have a .shared file with such settings in a plain make project, and it 
is read just fine. I also did a quick test of something similar in a 
QMake project, and everything appeared to work there, too. Does what 
you're saying above only refer to CMake projects? Or does it have 
something to do with kits? My CMake project uses a custom one, while the 
others are based on the built-in "Desktop" kit.


- Toralf

> Best Regards,
> Tobias

More information about the Qt-creator mailing list