User forums > Using Code::Blocks
Command line build and environment variables
cacb:
--- Quote from: jens on March 07, 2012, 12:40:04 am ---run codeblocks --help from a console to see the possible parameters.
--- End quote ---
I know that. I have used that plus the link referred to above. But as it does not answer the questions I have, I ask here.
--- Quote from: jens ---You can specify a target with --target= .
--- End quote ---
I know that as well. As you can see from my original post, I have been using that option all along.
Unless I am totally mistaken, in Code::Blocks, the --target option refers to a build target which is typically Debug, Release or something like that. I am already using that option, and it is working as expected. What I am missing is something else, a --project option that would allow me to say "Build that project and the projects it depends on" when referring to a workspace as the filename parameter. As far as I can tell, that is not possible from the command line now, you have to open the C::B IDE GUI to do it.
In the old MSV6 IDE, you could specify the project name on the command line even though a workspace (*.dsw) file was specified (see the /MAKE <project> option). This was quite useful, and a --project=<project_name> option in C::B would serve the same purpose I believe.
--- Quote from: jens ---The normal C::B does not work without a running xserver, but there is an experimental branch I started about a year (or so) ago, that is able to create a pure console-version of C::B.
It does not load any plugins, but the compiler-plugin, because all the plugins need an xserver (at the moment).
If I find the time, I continue working on the branch.
--- End quote ---
Ok, thank you for the information. My build environment does not allow me to build C::B from source (I use the MS compiler on Windows), plus I need the environment variables plugin to work.
So I will simply say that it would be cool if command line build without GUI became part of trunk. The reason for bringing this up in the first place, in addition to needing such features myself, is actually trying to convince a colleague that Code::Blocks does what he needs. But so far he comes back at me pointing at tools like http://maven.apache.org/ . With a little extra on the command line features in C::B it would be enough to end such debates.
In any case, Code::Blocks is a great tool! Thanks for all your hard work....
MortenMacFly:
--- Quote from: cacb on March 07, 2012, 02:38:08 pm ---As far as I can tell, that is not possible from the command line now, you have to open the C::B IDE GUI to do it.
--- End quote ---
That is wrong. The command line parameters work with workspaces just fine.
BTW: You may want to setup "virtual targets" to bundle the targets across projects within a workspace you want to build in batch mode. This allows you to build "sub-parts" of projects in a WS as desired.
cacb:
--- Quote from: MortenMacFly on March 07, 2012, 03:03:52 pm ---
--- Quote from: cacb on March 07, 2012, 02:38:08 pm ---As far as I can tell, that is not possible from the command line now, you have to open the C::B IDE GUI to do it.
--- End quote ---
That is wrong. The command line parameters work with workspaces just fine.
BTW: You may want to setup "virtual targets" to bundle the targets across projects within a workspace you want to build in batch mode. This allows you to build "sub-parts" of projects in a WS as desired.
--- End quote ---
It seems I am not getting through with my message, but nevermind, I'll leave it there. Thanks for reading anyway.
MortenMacFly:
--- Quote from: cacb on March 07, 2012, 09:57:43 pm ---It seems I am not getting through with my message, but nevermind, I'll leave it there. Thanks for reading anyway.
--- End quote ---
I'd say it seems you don't understand. Have a look at the build batch file for Code::Blocks in SVN. There we do what you want to do. I told you how, but it seems I am not getting through.
Navigation
[0] Message Index
[*] Previous page
Go to full version