Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: markP0 on September 18, 2020, 04:52:52 pm

Title: How can I set up a completely command-only build workflow?
Post by: markP0 on September 18, 2020, 04:52:52 pm
This has been frustrating me to no end. Following the directions in this thread (http://forums.codeblocks.org/index.php/topic,19071.0.html), I've been trying to set up a non-Makefile based build process but C::B keeps trying to use the default make commands, even if I have "This is a custom Makefile" selected with only a space for the Makefile name. I've also tried using "ninja" in the custom make commands with pre-build steps for changing into a build directory and running CMake, but it still tries to use "make" and won't build. I've also tried switching to *No compiler* but just like in the linked thread, C::B refuses to even attempt a build without a compiler, so I don't know why that option is even there.

When I click "Build," I need to do 3 things:

How can I have Code::Blocks just execute these commands when I try to build?
Title: Re: How can I set up a completely command-only build workflow?
Post by: Sowaco on September 18, 2020, 09:00:57 pm
Ähhhhh...

You want to call a build process by calling a "Build System generator" (CMake) to generate another "Build System" (ninja) unknown for CB . All of them inside an IDE with it's own, but Cmake supported build system?

For havens sake. Why?

If you really want to do this, write a simple make file with the commands inside. Done. No headache. No frustration.

Do you know, that you can create CB-projects from CMake? Build in support from CMake. And if you know a litte bit about CMake, than you can update the CB-projects automatically.
Title: Re: How can I set up a completely command-only build workflow?
Post by: markP0 on September 25, 2020, 05:47:41 am
Ähhhhh...

You want to call a build process by calling a "Build System generator" (CMake) to generate another "Build System" (ninja) unknown for CB . All of them inside an IDE with it's own, but Cmake supported build system?

For havens sake. Why?

I'm new to this particular project and didn't write their build process. It's... not what I would have gone with, if I were writing it, to put it very nicely.
Title: Re: How can I set up a completely command-only build workflow?
Post by: stahta01 on September 27, 2020, 01:33:02 am
Why not use cmake to make "CodeBlocks - Ninja" CodeBlocks project file?

Edit: Add link https://cmake.org/cmake/help/v3.0/generator/CodeBlocks.html (https://cmake.org/cmake/help/v3.0/generator/CodeBlocks.html)

Tim S.