Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: Escorte on April 10, 2006, 12:28:07 pm
-
Hi!
I want to build my full workspace in release mode, but If I select Build -> Select target -> Release, then Build workspace, the compiling starts with debug target. How can I build the full workspace in release mode?
-
I want to build my full workspace in release mode, but If I select Build -> Select target -> Release, then Build workspace, the compiling starts with debug target. How can I build the full workspace in release mode?
There is probably a misunderstanding regarding what "Debug" and "Release" means from your side. You have used Microsoft Visual Studio before, haven't you ;)
Your projects (which you probably have imported from VS) have a target for Debug and a target for Release. That is not the exact same thing as in Visual Studio, though.
If you select "Release" from the menu, then build/rebuild will build the target "Release" of the currently active project instead of building all targets in that project.
However, if you build / rebuild the workspace, it will rebuild all targets. That is because "Debug" and "Release" are not some special builtin settings with a well-defined meaning, but arbitrary target names. A target basically tells the IDE to do some specific operation with a defined subset of all project files, producing one specific output. That could be a shared library (which may respectively be used by another target), a program, or virtually anything.
A target name could be anything, the IDE cannot possibly know that "Release" means "Release". To the IDE, "Release" means just as much as "MainApplication" or "SDK" or "CoreLibraries".
-
Actually, the compiler plugin is smart enough to try and build only the same target across a workspace ;)
For this to work, you have to use the exact same target names for all your projects in the workspace. I.e. not "Debug" in one project and "Debug|Win32" in another.
And to make it even more compatible with how you 're used to VS working, go into project properties and uncheck "Build this target with All" from all your targets.
-
Notice that the above work for the HEAD version, not 1.0rc2 (you didn't mention what version you 're using).