Re: [Qt-creator] Subprojects handling

2014-01-09 Thread Ziller Eike

On Jan 9, 2014, at 9:50 AM, Yves Bailly  wrote:

> Le 08/01/2014 17:54, Jeandet Alexis a écrit :
>>> From what I understand your problem is that creator works as expected,
>> Or also open your project as kai said in the same sessions you can open
>> all of them separately and also open your top project then just activate
>> the one you want.
> 
> But in this case I get two build directories for each subproject (simplified
> paths, add Debug/Release for each):
> - one in /builds/main_project/subproject_NN when building the top-project,
> - one in /builds/subproject_NN when building each of the sub-projects
> ...by default.
> 
> Of course I can go through each subproject opened separately and point the
> build directory to the sub-main one. But that is *really* cumbersome...
> 
> More specifically, what I would like is:
> - if I ask to build the top-project, all the sub-projects are build
>   --> this is the current behaviour, perfect
> - if I ask to build one of the sub-project, only this one is build
>   --> this is the current behaviour, perfect
> - if I ask to *run* the top-project, all the sub-projects are build
>   --> this is the current behaviour, perfect
> - if I ask to *run* one of the sub-project, only this one should be
>   build if necessary
>   --> not the current behaviour, all subprojects are build (or checked
> at least)

The point is: We do not know if you want to only compile the sub-project. 
Because most of the time this will be wrong, and lead to unexpected behavior of 
the application that is run. Because if other subprojects, that the “current” 
subproject depends on, have changes, these changes would not be compiled. You’d 
need to manually go to all subprojects and explicitly compile them, to make 
sure they are up to date when running the application. So, if you automatically 
build before run, we ‘make’ your whole product, because it’s the only sane 
thing to do.

Br, Eike

> To put this in context, I'm talking here about more than 150 sub-projects:
> opening them one by one is tedious.
> Indeed the "-j" switch helps, but not that much, and it's not relevent
> when using "nmake" (yes I know about "jom", which can't be used sometimes
> for some obscure internal reason).
> 
> To avoid the doubled build directory, I found a rather easy way:
> - launch QtCreator, set default build directory to
>   
> ../builds/%{CurrentProject:Name}-%{CurrentKit:FileSystemName}-%{CurrentBuild:Name}
> - open and configure the top-project, build it (takes a long time)
> - set default build directory to
>   
> ../../builds/topproject-%{CurrentKit:FileSystemName}-%{CurrentBuild:Name}/%{CurrentProject:Name}
> - open and configure each sub-project
> 
> At least the bunch of subprojects can be build in one go and don't have to be 
> rebuild
> when opening each one :-)
> 
> Regards,
> 
> -- 
>  /- Yves Bailly - Software developer   -\
>  \- Sescoi R&D  - http://www.sescoi.fr -/
> "The possible is done. The impossible is being done. For miracles,
> thanks to allow a little delay."
> ___
> Qt-creator mailing list
> Qt-creator@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator

-- 
Eike Ziller, Senior Software Engineer - Digia, Qt
 
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 
144331 B

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Subprojects handling

2014-01-09 Thread Oswald Buddenhagen
On Wed, Jan 08, 2014 at 04:05:41PM +0100, Yves Bailly wrote:
> The subdirs are all executable projects (no libraries) which
> have no build-time dependencies between them.
 
vs.

> CONFIG += ordered

do you even know what that means?

> When I request to run one of the subproject, *all* the subprojects
> are always build.
>
i don't think *all* is actually true, unless you are building exactly
the last project you listed.
anyway. works according to specification. resolved:invalid.

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Subprojects handling

2014-01-09 Thread Yves Bailly
Le 08/01/2014 17:54, Jeandet Alexis a écrit :
>>From what I understand your problem is that creator works as expected,
> Or also open your project as kai said in the same sessions you can open
> all of them separately and also open your top project then just activate
> the one you want.

But in this case I get two build directories for each subproject (simplified
paths, add Debug/Release for each):
- one in /builds/main_project/subproject_NN when building the top-project,
- one in /builds/subproject_NN when building each of the sub-projects
...by default.

Of course I can go through each subproject opened separately and point the
build directory to the sub-main one. But that is *really* cumbersome...

More specifically, what I would like is:
- if I ask to build the top-project, all the sub-projects are build
   --> this is the current behaviour, perfect
- if I ask to build one of the sub-project, only this one is build
   --> this is the current behaviour, perfect
- if I ask to *run* the top-project, all the sub-projects are build
   --> this is the current behaviour, perfect
- if I ask to *run* one of the sub-project, only this one should be
   build if necessary
   --> not the current behaviour, all subprojects are build (or checked
 at least)

To put this in context, I'm talking here about more than 150 sub-projects:
opening them one by one is tedious.
Indeed the "-j" switch helps, but not that much, and it's not relevent
when using "nmake" (yes I know about "jom", which can't be used sometimes
for some obscure internal reason).

To avoid the doubled build directory, I found a rather easy way:
- launch QtCreator, set default build directory to
   
../builds/%{CurrentProject:Name}-%{CurrentKit:FileSystemName}-%{CurrentBuild:Name}
- open and configure the top-project, build it (takes a long time)
- set default build directory to
   
../../builds/topproject-%{CurrentKit:FileSystemName}-%{CurrentBuild:Name}/%{CurrentProject:Name}
- open and configure each sub-project

At least the bunch of subprojects can be build in one go and don't have to be 
rebuild
when opening each one :-)

Regards,

-- 
  /- Yves Bailly - Software developer   -\
  \- Sescoi R&D  - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Subprojects handling

2014-01-08 Thread Jeandet Alexis
Le mercredi 08 janvier 2014 à 17:37 +0100, Yves Bailly a écrit :
> Le 08/01/2014 17:27, Mohamed Fawzi a écrit :
> > Build & Run > General > Always build project before deploying it
> >
> > in the Options.
> 
> But then the subproject I want to run is not build, I have to build
> it explicitly.
> 
> Anyway it's the closest I can get to what I want it seems...
> 
> Thanks all.
> 
Hi,

From what I understand your problem is that creator works as expected,
it call make from the top directory and then make enter each sub-project
and "update" what it should. If you want to make it faster you can
parallelize it in the build option by adding -j N (N=number of process)
to the make arguments. 
Or also open your project as kai said in the same sessions you can open
all of them separately and also open your top project then just activate
the one you want.

regards,
Alexis.

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Subprojects handling

2014-01-08 Thread Yves Bailly
Le 08/01/2014 17:27, Mohamed Fawzi a écrit :
> Build & Run > General > Always build project before deploying it
>
> in the Options.

But then the subproject I want to run is not build, I have to build
it explicitly.

Anyway it's the closest I can get to what I want it seems...

Thanks all.

-- 
  /- Yves Bailly - Software developer   -\
  \- Sescoi R&D  - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Subprojects handling

2014-01-08 Thread Yves Bailly
Le 08/01/2014 17:09, Ziller Eike a écrit :
> On Jan 8, 2014, at 4:05 PM, Yves Bailly  wrote:
>> I have a main project file using template "subdirs":
>>
>> When I request to run one of the subproject, *all* the subprojects
>> are always build. Even if the build step is reduced to checking
>> nothing has changed (message "Nothing to be done for 'first'"),
>> it can take a rather large amount of time.
>
> Bind a keyboard shortcut to Build > Build subproject
> (or try that menu item from the menu first)

My problem is not building the sub-project, but running it
*without* building all the other sub-projects...

-- 
  /- Yves Bailly - Software developer   -\
  \- Sescoi R&D  - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Subprojects handling

2014-01-08 Thread Mohamed Fawzi
Build & Run > General > Always build project before deploying it

in the Options.

Fawzi
On 8 Jan 2014, at 17:19, Yves Bailly  wrote:

> Le 08/01/2014 17:09, Ziller Eike a écrit :
>> On Jan 8, 2014, at 4:05 PM, Yves Bailly  wrote:
>>> I have a main project file using template "subdirs":
>>> 
>>> When I request to run one of the subproject, *all* the subprojects
>>> are always build. Even if the build step is reduced to checking
>>> nothing has changed (message "Nothing to be done for 'first'"),
>>> it can take a rather large amount of time.
>> 
>> Bind a keyboard shortcut to Build > Build subproject
>> (or try that menu item from the menu first)
> 
> My problem is not building the sub-project, but running it
> *without* building all the other sub-projects...
> 
> -- 
>  /- Yves Bailly - Software developer   -\
>  \- Sescoi R&D  - http://www.sescoi.fr -/
> "The possible is done. The impossible is being done. For miracles,
> thanks to allow a little delay."
> ___
> Qt-creator mailing list
> Qt-creator@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Subprojects handling

2014-01-08 Thread Koehne Kai

> -Original Message-
> On Jan 8, 2014, at 4:05 PM, Yves Bailly  wrote:
> 
> > [...]
> > When I request to run one of the subproject, *all* the subprojects are
> > always build. Even if the build step is reduced to checking nothing
> > has changed (message "Nothing to be done for 'first'"), it can take a
> > rather large amount of time.
> >
> > Can this be avoided in some way? I couldn't find an option.
> >
> > Thanks for any hint.
> 
> Bind a keyboard shortcut to Build > Build subproject (or try that menu item
> from the menu first)

Another way is to load only the subprojects you're really interested in, as 
separate top-level projects. You can even define dependencies between them in 
the Projects pane, if needed.

That's at least what I do when doing bigger work in Qt Creator on Windows , 
just loading the plugins I want to work on + app.pro
 
Regards

Kai
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Subprojects handling

2014-01-08 Thread Ziller Eike

On Jan 8, 2014, at 4:05 PM, Yves Bailly  wrote:

> 
> Greetings all,
> 
> I have a main project file using template "subdirs":
> TEMPLATE = subdirs
> CONFIG += ordered
> SUBDIRS += ...a long list of subdirs...
> 
> The subdirs are all executable projects (no libraries) which
> have no build-time dependencies between them.
> 
> When I request to run one of the subproject, *all* the subprojects
> are always build. Even if the build step is reduced to checking
> nothing has changed (message "Nothing to be done for 'first'"),
> it can take a rather large amount of time.
> 
> Can this be avoided in some way? I couldn't find an option.
> 
> Thanks for any hint.

Bind a keyboard shortcut to Build > Build subproject
(or try that menu item from the menu first)

Br, Eike

-- 
Eike Ziller, Senior Software Engineer - Digia, Qt
 
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 
144331 B

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


[Qt-creator] Subprojects handling

2014-01-08 Thread Yves Bailly

Greetings all,

I have a main project file using template "subdirs":
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += ...a long list of subdirs...

The subdirs are all executable projects (no libraries) which
have no build-time dependencies between them.

When I request to run one of the subproject, *all* the subprojects
are always build. Even if the build step is reduced to checking
nothing has changed (message "Nothing to be done for 'first'"),
it can take a rather large amount of time.

Can this be avoided in some way? I couldn't find an option.

Thanks for any hint.

-- 
  /- Yves Bailly - Software developer   -\
  \- Sescoi R&D  - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator