News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Best way to use CMake for build

Started by rhasselbaum, January 15, 2010, 10:34:56 PM

Previous topic - Next topic

rhasselbaum

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!

Jenna

If you use a nightly build, you can use pre- and post-build steps together with custom makefiles.

rhasselbaum

Thanks. Is the nightly build stable?

MortenMacFly

Quote from: rhasselbaum on January 16, 2010, 02:20:45 PM
Thanks. Is the nightly build stable?
Yes, but the next one will be even better suited for large (!) projects.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]