Author Topic: Workspace target  (Read 4265 times)

Escorte

  • Guest
Workspace target
« 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?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Workspace target
« Reply #1 on: April 10, 2006, 02:50:21 pm »
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".
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Workspace target
« Reply #2 on: April 10, 2006, 03:21:31 pm »
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.
Be patient!
This bug will be fixed soon...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Workspace target
« Reply #3 on: April 10, 2006, 03:23:23 pm »
Notice that the above work for the HEAD version, not 1.0rc2 (you didn't mention what version you 're using).
Be patient!
This bug will be fixed soon...