Debug vs release targets
I'm using QtCreator for the first time. I read here http://doc.qt.nokia.com/qtcreator-2.4/creator-build-settings.html that "By default, Qt Creator creates debug and release build configurations.", but when I go into "Build Settings", I only see an "all" build, and I don't see any option of whether it is debug or release?
I tried using the Add drop down to create a new build, but I still was not given an option to use Debug or Release.
In fact, at the top of the "Projects" tab, I do not see a "Targets" tab as there is in that screenshot, I only have "Build Settings", "Run Settings", "Editor Settings", "Code Style Settings", and "Dependencies."
One last thing - if I click "Details" under Build Steps -> Make, I see a list of the targets, but they are all unchecked. However, when I build the project, some of them build. Can anyone explain that?
My QtCreator project was created by opening an existing CMakeLists.txt file.
Thanks in advance!
So your project is based on CMake. I cannot say much there, as it's not really my area, but the documentation is written for QMake projects. There is a support for CMake, but probably there are some differences, and that is why you might lack some options.
Try some QMake projects (Qt Examples are a good start, or a new project in Qt Creator - it provides some ready-made templates that make it all easier for beginners).
I found that if (outside of QtCreator) in a normal terminal I run ccmake in the build directory and change the CMAKE_BUILD_TYPE to DEBUG, then configure and generate, then go back to QtCreator and rebuild, that the build mode is switched. Though it works, this seems really awkward. Can anyone confirm that this is the only way to do this?
So if you click on the Build Target button (above the green "play arrow" run button in the lower-left corner) do you only have one option?
mlong - yes, there is only the 'all' target. As I mentioned, I can create a new target, but it also defaults to Release mode and there doesn't seem to be a way to change it (from inside QtCreator).
You should be able to pass extra command line argument to cmake when it is run. This actually allows for every configuration variable in cmake to be set, but it is rather less convenient than using ccmake...
I have posted a comment here:
and a new feature request here: