Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: rhasselbaum on January 15, 2010, 10:34:56 pm

Title: Best way to use CMake for build
Post by: rhasselbaum on January 15, 2010, 10:34:56 pm
Is there a pattern for setting up a Code::Blocks project to use CMake for the build? Ideally, I want Code::Blocks to invoke CMake as a pre-build step to generate a Makefile and then have Code::Blocks invoke that Makefile to build the project.

I figured out that I can point it to a custom Makefile by going to project properties, specifying one in the Project Settings tab, and selecting "This is a custom Makefile". Will that turn off Code::Block's own compiler/linker invocations? How can I set up the pre-build step? I found the Pre/Post-Build Steps tab under Build Options, but the controls are disabled.

Am I going about this the right way? Thanks!
Title: Re: Best way to use CMake for build
Post by: Jenna on January 15, 2010, 10:55:21 pm
If you use a nightly build, you can use pre- and post-build steps together with custom makefiles.
Title: Re: Best way to use CMake for build
Post by: rhasselbaum on January 16, 2010, 02:20:45 pm
Thanks. Is the nightly build stable?
Title: Re: Best way to use CMake for build
Post by: MortenMacFly on January 16, 2010, 03:21:20 pm
Thanks. Is the nightly build stable?
Yes, but the next one will be even better suited for large (!) projects.