I am building a .pro based Qt project using Qt creator. I really like Creator. But I am quite confused by the difference between setting the build in creator to debug/release and doing the same thing in the .pro file.
Ideally I just want to set debug or release builds in creator and not to have to change the .pro file.
If I put this in the .pro file:
CONFIG = qt warn_on resources uic
TEMPLATE = app
win32 {
QMAKE_CXXFLAGS += -EHsc
debug {
QMAKE_CXXFLAGS += -Gm
}
release {
QMAKE_CXXFLAGS += -Zi -GL
}
}
CONFIG = qt warn_on resources uic
TEMPLATE = app
win32 {
QMAKE_CXXFLAGS += -EHsc
debug {
QMAKE_CXXFLAGS += -Gm
}
release {
QMAKE_CXXFLAGS += -Zi -GL
}
}
To copy to clipboard, switch view to plain text mode
Then set the creator build to debug, it builds it with release setting (e.g. -O2). The build output is:
qmake.exe" D:\personal\asg\asg.pro -r -spec win32-msvc2010
I also tried:
qmake.exe" D:\personal\asg\asg.pro -r -spec win32-msvc2010 "CONFIG+=debug"
But it didn't seem to make any difference.
I can only seem to get it to do what I want by setting "CONFIG=debug" in both the .pro file and the creator build. This makes changing between debug and release builds tedious.
I have had a look through the qmake and creator documentation, but I couldn't find anything useful. I'm sure there must be a straightforward answer.
Bookmarks