Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, August 2007
Use different TARGET values for release & debug modes in *.pro file


Message 1 in thread

Dear community,

I would like to have different target names for release & debug modes. The
following *.pro content isn't understood by qmake...
Can anybody understand why?

-------- *.pro content --------
debug:   TARGET = myproject-$${VERSION}-g_$$(QMAKESPEC)
release: TARGET = myproject-$${VERSION}-r_$$(QMAKESPEC)

message($${TARGET})
-------- *.pro content --------

Thank you,
Christophe

PS: I'm using Outlook Express (...) to post on this list, does Trolltech
provide any web interface to do so? 


--
 [ signature omitted ] 

Message 2 in thread

On mandag den 13. August 2007, Christophe Bismuth wrote:
> Dear community,
>
> I would like to have different target names for release & debug modes. The
> following *.pro content isn't understood by qmake...
> Can anybody understand why?
>
> -------- *.pro content --------
> debug:   TARGET = myproject-$${VERSION}-g_$$(QMAKESPEC)
> release: TARGET = myproject-$${VERSION}-r_$$(QMAKESPEC)
>
> message($${TARGET})
> -------- *.pro content --------

If you're using debug and release builds (visual studio) then it does not work 
indeed. The problem is that it doesn't do the debug and release as two passes 
over the .pro file. It does one pass and makes two targets. I haven't found a 
way to change the executable name based on which build it is.

> PS: I'm using Outlook Express (...) to post on this list, does Trolltech
> provide any web interface to do so?

No. But your email address is gmail.com - why would you need one?

Bo.

-- 
 [ signature omitted ] 

Message 3 in thread

That's right, qmake makes only one pass...
You're right, I'm swithing to Gmail :ç)

Thank you,
Christophe

"Bo Thorsen" <bo@xxxxxxxxxxxxxxxxxxxxx> a écrit dans le message de news: 
200708131319.29776.bo@xxxxxxxxxxxxxxxxxxxxxxxx
> On mandag den 13. August 2007, Christophe Bismuth wrote:
>> Dear community,
>>
>> I would like to have different target names for release & debug modes. 
>> The
>> following *.pro content isn't understood by qmake...
>> Can anybody understand why?
>>
>> -------- *.pro content --------
>> debug:   TARGET = myproject-$${VERSION}-g_$$(QMAKESPEC)
>> release: TARGET = myproject-$${VERSION}-r_$$(QMAKESPEC)
>>
>> message($${TARGET})
>> -------- *.pro content --------
>
> If you're using debug and release builds (visual studio) then it does not 
> work
> indeed. The problem is that it doesn't do the debug and release as two 
> passes
> over the .pro file. It does one pass and makes two targets. I haven't 
> found a
> way to change the executable name based on which build it is.
>
>> PS: I'm using Outlook Express (...) to post on this list, does Trolltech
>> provide any web interface to do so?
>
> No. But your email address is gmail.com - why would you need one?
>
> Bo.
>
> -- 
>
> Thorsen Consulting ApS - Qt consulting services
> http://www.thorsen-consulting.dk
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/ 


--
 [ signature omitted ] 

Message 4 in thread

Hi,

I didn't try it with Visual Studio but at least for the Makefiles generated 
for Linux the snippet below works:

---

CONFIG += debug_and_release

CONFIG(debug, debug|release) {
  TARGET = myproject-$${VERSION}-g_$$(QMAKESPEC)
} else {
  TARGET = myproject-$${VERSION}-r_$$(QMAKESPEC)
}

---

Regards,
Bernd


On Monday 13 August 2007, Christophe Bismuth wrote:
> That's right, qmake makes only one pass...
> You're right, I'm swithing to Gmail :ç)
>
> Thank you,
> Christophe
>
> "Bo Thorsen" <bo@xxxxxxxxxxxxxxxxxxxxx> a écrit dans le message de news:
> 200708131319.29776.bo@xxxxxxxxxxxxxxxxxxxxxxxx
>
> > On mandag den 13. August 2007, Christophe Bismuth wrote:
> >> Dear community,
> >>
> >> I would like to have different target names for release & debug
> >> modes. The
> >> following *.pro content isn't understood by qmake...
> >> Can anybody understand why?
> >>
> >> -------- *.pro content --------
> >> debug:   TARGET = myproject-$${VERSION}-g_$$(QMAKESPEC)
> >> release: TARGET = myproject-$${VERSION}-r_$$(QMAKESPEC)
> >>
> >> message($${TARGET})
> >> -------- *.pro content --------
> >
> > If you're using debug and release builds (visual studio) then it does
> > not work
> > indeed. The problem is that it doesn't do the debug and release as two
> > passes
> > over the .pro file. It does one pass and makes two targets. I haven't
> > found a
> > way to change the executable name based on which build it is.
> >
> >> PS: I'm using Outlook Express (...) to post on this list, does
> >> Trolltech provide any web interface to do so?
> >
> > No. But your email address is gmail.com - why would you need one?
> >
> > Bo.
> >
> > --
> >
> > Thorsen Consulting ApS - Qt consulting services
> > http://www.thorsen-consulting.dk
> >
> > --
> > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> > "unsubscribe" in the subject or the body.
> > List archive and information: http://lists.trolltech.com/qt-interest/
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body. List archive and information:
> http://lists.trolltech.com/qt-interest/


--
 [ signature omitted ] 

Message 5 in thread

Thank you Bernd, it works well with MinGW.

2007/8/13, Bernd Brandstetter <bbrand@xxxxxxxxxx>:
>
> Hi,
>
> I didn't try it with Visual Studio but at least for the Makefiles
> generated
> for Linux the snippet below works:
>
> ---
>
> CONFIG += debug_and_release
>
> CONFIG(debug, debug|release) {
>   TARGET = myproject-$${VERSION}-g_$$(QMAKESPEC)
> } else {
>   TARGET = myproject-$${VERSION}-r_$$(QMAKESPEC)
> }
>
> ---
>
> Regards,
> Bernd
>
>
> On Monday 13 August 2007, Christophe Bismuth wrote:
> > That's right, qmake makes only one pass...
> > You're right, I'm swithing to Gmail :Ã)
> >
> > Thank you,
> > Christophe
> >
> > "Bo Thorsen" <bo@xxxxxxxxxxxxxxxxxxxxx> a Ãcrit dans le message de news:
> > 200708131319.29776.bo@xxxxxxxxxxxxxxxxxxxxxxxx
> >
> > > On mandag den 13. August 2007, Christophe Bismuth wrote:
> > >> Dear community,
> > >>
> > >> I would like to have different target names for release & debug
> > >> modes. The
> > >> following *.pro content isn't understood by qmake...
> > >> Can anybody understand why?
> > >>
> > >> -------- *.pro content --------
> > >> debug:   TARGET = myproject-$${VERSION}-g_$$(QMAKESPEC)
> > >> release: TARGET = myproject-$${VERSION}-r_$$(QMAKESPEC)
> > >>
> > >> message($${TARGET})
> > >> -------- *.pro content --------
> > >
> > > If you're using debug and release builds (visual studio) then it does
> > > not work
> > > indeed. The problem is that it doesn't do the debug and release as two
> > > passes
> > > over the .pro file. It does one pass and makes two targets. I haven't
> > > found a
> > > way to change the executable name based on which build it is.
> > >
> > >> PS: I'm using Outlook Express (...) to post on this list, does
> > >> Trolltech provide any web interface to do so?
> > >
> > > No. But your email address is gmail.com - why would you need one?
> > >
> > > Bo.
> > >
> > > --
> > >
> > > Thorsen Consulting ApS - Qt consulting services
> > > http://www.thorsen-consulting.dk
> > >
> > > --
> > > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> > > "unsubscribe" in the subject or the body.
> > > List archive and information: http://lists.trolltech.com/qt-interest/
> >
> > --
> > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> > "unsubscribe" in the subject or the body. List archive and information:
> > http://lists.trolltech.com/qt-interest/
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>

Message 6 in thread

"Christophe BISMUTH" <christophe.bismuth@xxxxxxxxx> wrote on 08/14/2007
03:54:18 AM:

# Thank you Bernd, it works well with MinGW.

FWIW I can confirm that this will work with MSVS as well.

--
 [ signature omitted ]