Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: BiMode on January 05, 2005, 02:00:48 am
-
Hello,
I like the way VC++ IDE does this (separate profile for debug build and release build).
So, how do I do this in CodeBlock?
Thanks.
-
It hasn't been designed with Debug/Release configurations in mind. So this options is not available yet...
-
It hasn't been designed with Debug/Release configurations in mind. So this options is not available yet...
A very useful option, please consider to add it soon, while the program is young (before the .cbp file format is fixed forever). Debug/Release directories as well. Parinya had this feature (even if he had a much weaker project file format). I wish I could do something in return, or do it myself, but I'm not up to speed with wxWidgets yet, and I have no money!
What about (monoplatform) Dev-Cpp? Have you left the project?
Best regards,
Troels
-
A very useful option, please consider to add it soon, while the program is young (before the .cbp file format is fixed forever). Debug/Release directories as well. Parinya had this feature (even if he had a much weaker project file format).
Just to get it out of the way, the .cbp format cannnot be fixed. It's XML. "X" stands for eXtensible ;)
About the Debug/Release configuration, it's something that will probably be done in the future. The main goal now is to make it stable, under all platforms.
What about (monoplatform) Dev-Cpp? Have you left the project?
Officially no (I 'm still listed as a developer) but practically, yes. I have left the project for around a year now.
Yiannis.
-
Can't different targets be established for this? They inherit compiler options, so setting proper directories for the object files and the output file and switching "generate debug info" in one of the instances should probably do the work (when the compiler options get fixed).
-
P.S. Keep forgetting to sign my posts...
Mike
-
With the latest changes I 'm currently making in the build system, it will be possible.
I can see it, you 're gonna love the next update :)
Yiannis.
-
Hi Yiannis,
Did you see my "fix" for "one source-multi target" problem ?
Here it is again:
void MakefileGenerator::DoAddMakefileTarget_Objs(wxString& buffer)
{
// NOTE (hd#1#): moved down m_ObjectFiles.Clear();
wxString tmp;
int targetsCount = m_Project->GetBuildTargetsCount();
for (int x = 0; x < targetsCount; ++x)
{
ProjectBuildTarget* target = m_Project->GetBuildTarget(x);
if (!target)
break;
m_ObjectFiles.Clear(); // NOTE (hd#1#): moved here
#ifdef __WXMSW__
--
Regards,
Hakki Dogusan
-
Hi Hakki,
of course I 've seen it :)
I didn't have the chance yet to test it though. The main problem with having a single file part of multiple targets, was that "make" would complain about its multiple appearences in the Makefile. So I had to make sure that every file in the Makefile appears only once (even if it is included in multiple targets) - IIRC that is the purpose of the m_ObjectFiles array. So, this file would be compiled with *only* one target's compile options (usually the first target in the list that it belongs).
Your patch actually reverses this behaviour and allows for multiple appearences of the same file in the Makefile.
I guess "make" complains and I 'm afraid that the file gets compiled with the same options, always. Not debug-release options depending on the target...
Can you confirm this?
Anyway, one of the latest changes is that it is possible for CB to use "direct build mode" - not "make". This allows for debug/release configurations :)
Yiannis.
-
Hi,
I re-checked generated makefile. It works here! :-)
I can send the makefile, if you want...
I hope "direct build mode" doesn't remove "generate makefile" option, I'm using these
as a make-learning tool.
--
Regards,
Hakki Dogusan
-
Hi,
I re-checked generated makefile. It works here! :-)
I can send the makefile, if you want...
Do this, please...
I hope "direct build mode" doesn't remove "generate makefile" option, I'm using these
as a make-learning tool.
No, you are able to select the build mode used ;)
Either way, even if "make" supported was dropped completely (which isn't), there would still be an option "Export Makefile" :)
Yiannis.