How to separate release and debug builds?
-
Hi
I would like to put binaries of release and debug build in different folders beside source code. in .pro file:
@
CONFIG(debug){
DESTDIR = ./debug
OBJECTS_DIR = debug/.obj
MOC_DIR = debug/.moc
RCC_DIR = debug/.rcc
UI_DIR = debug/.ui
}CONFIG(release){
DESTDIR = ./release
OBJECTS_DIR = release/.obj
MOC_DIR = release/.moc
RCC_DIR = release/.rcc
UI_DIR = release/.ui
}
@For release builds everything is good. I have a ./release directory in root of project. But for debug build, qmake don't create a debug directory but it's name is release (again!):
@
qmake CONFIG+=debug CONFIG+=local // generates release and put everything in that directory
@ -
I have this in my projects and seems to work well:
@
Release {
...
}
Debug {
...
}
@
One thing I noticed with qmake is that even if you specify different output directories for debug and release it will create "debug" and "release" directories in both, but use only one of them (appropriate for the config). -
[quote author="Krzysztof Kawa" date="1363696030"]
One thing I noticed with qmake is that even if you specify different output directories for debug and release it will create "debug" and "release" directories in both, but use only one of them (appropriate for the config).[/quote]Only on Windows.
-
[quote author="sierdzio" date="1363696091"]
Only on Windows.[/quote]
™ :) -
How about using shadow builds instead of qmake hackery?
Remove all the code you list, create a directory next to the sources and change into it. Then do "qmake ../sources/project.pro" and all the generated files should end up in the build directory.
-
[quote author="Tobias Hunger" date="1363699975"]How about using shadow builds instead of qmake hackery?
Remove all the code you list, create a directory next to the sources and change into it. Then do "qmake ../sources/project.pro" and all the generated files should end up in the build directory.[/quote]
Nope... I don't like to mix binaries and source. Unfortunately for some reasons I have to do like so.