User forums > General (but related to Code::Blocks)
New CMake generator using Code::Blocks' internal build system
Benjamin Eikel:
Dear Code::Blocks community,
I am working on a new generator for CMake that creates a native Code::Blocks project (see the discussion "Using the internal Code::Blocks builder" on cmake-developers). In CMake, there exists already a generator for Code::Blocks, but this generates a Makefile and a Code::Blocks project using that Makefile. My new generator is already able to generate project files for simple CMake projects and build them using the internal build system of Code::Blocks.
Currently, I have the problem that I cannot start Code::Blocks without a graphical user interface. Every time I invoke Code::Blocks with a build target, it opens a console window showing the build output. I have found no way to suppress the window. I also found an old thread stating that there is no possibility to disable the GUI. Maybe the situation has improved in the last years. Is there a command-line-only invocation possible now?
MortenMacFly:
--- Quote from: Eikel on September 23, 2012, 01:37:11 pm ---I am working on a new generator for CMake that creates a native Code::Blocks project (see the discussion "Using the internal Code::Blocks builder"
--- End quote ---
I was in contact with the author of the other builder - nice to hear that you decide to go for it! Its way better than the Makefile based one (although it was working fine for me). [OT: Send greetings to Alex - I know him quite well... ;-)]
--- Quote from: Eikel on September 23, 2012, 01:37:11 pm ---I also found an old thread stating that there is no possibility to disable the GUI. Maybe the situation has improved in the last years. Is there a command-line-only invocation possible now?
--- End quote ---
We do have a batch build option, which uses minimal UI (see here: http://svn.berlios.de/wsvn/codeblocks/trunk/src/batch_build_core for an example how to use it). However, even the tiny batch windows uses UI.
We have plans for a non-UI version of the builder and there is a working branch of Code::Blocks w/o UI here: http://svn.berlios.de/wsvn/codeblocks/branches/codeblocks_console
It is sync'd with trunk from time to time, but its not something many people use. But as I said: It works, but is not something "ready" yet.
however, this should be of no concern for the project builder, because the project file won't be affected by whether the IDE uses UI or not.
Why are you asking? Why do you need a non-UI builder?
MortenMacFly:
...edit: I just read the thread you posted - I guess I know why you are asking, because of this:
> This is more or less necessary so cmake can run its test suite to verify
> the generator works correctly.
Right?
Well, the batch window closes automatically at end (which is actually an option) and returns an error code which you can use for verification of a successful build. So if the need is just to run a C::B build process externally with feedback, this is possible. If you insist it shall not have any UI (i.e. for console build server) - only with the branch. But for my understanding for cmake the first one applies...
Maybe Alex can make a statement here... AFAIK he is even member of this forum... or was at least...
Benjamin Eikel:
--- Quote from: MortenMacFly on September 23, 2012, 02:52:34 pm ---...edit: I just read the thread you posted - I guess I know why you are asking, because of this:
> This is more or less necessary so cmake can run its test suite to verify
> the generator works correctly.
Right?
--- End quote ---
Right, this is one reason. For example, on the testing server you will not have any possibility to run applications that need a GUI.
Furthermore, CMake runs many tests in its configurations phase (e.g. checking if the compiler works correctly). Projects can add further tests (e.g. checking if a library contains a given symbol, if a header can be used for compilation). Most of these tests generate a project using the current generator (in my case the new Code::Blocks generator). Then the project is build to execute the test (in my case, a Code::Blocks window pops up and closes after a short while). This makes the whole process quite slow and annoying.
Maybe I will check out the console-only branch you mentioned.
MortenMacFly:
--- Quote from: Eikel on September 23, 2012, 03:30:24 pm ---Furthermore, CMake runs many tests in its configurations phase (e.g. checking if the compiler works correctly). Projects can add further tests (e.g. checking if a library contains a given symbol, if a header can be used for compilation). Most of these tests generate a project using the current generator (in my case the new Code::Blocks generator). Then the project is build to execute the test (in my case, a Code::Blocks window pops up and closes after a short while). This makes the whole process quite slow and annoying.
--- End quote ---
OK - but this sounds like an IDE is required to have a non-UI build process to make it into Cmake?! That would be new to me. I understand having a non-UI build its a "nice to have" thing, but it shouldn't be a requirement. I think there are plenty of IDE's around that do not support that. How do you handle the very common and famous Eclipse IDE for example? (I know Cmake supports it, too.) And was it really different at the time you did the C::B Makefile based generator?
So... Do you need this feature only temporarily for developing the generator and drive your (Cmake) tests, or is this really a hard requirement on the IDE? For the first case, the mentioned branch should be just fine (maybe Jens can do another merge before), but for the latter... ???
Navigation
[0] Message Index
[#] Next page
Go to full version