User forums > Using Code::Blocks
How can I set up a completely command-only build workflow?
(1/1)
markP0:
This has been frustrating me to no end. Following the directions in this thread, 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:
* cd into a directory called "build"
* run cmake ..
* run ninja
How can I have Code::Blocks just execute these commands when I try to build?
Sowaco:
Ä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.
markP0:
--- Quote from: 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?
--- End quote ---
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.
stahta01:
Why not use cmake to make "CodeBlocks - Ninja" CodeBlocks project file?
Edit: Add link https://cmake.org/cmake/help/v3.0/generator/CodeBlocks.html
Tim S.
Navigation
[0] Message Index
Go to full version