User forums > General (but related to Code::Blocks)

Using CodeBlocks with CMake

(1/1)

Kazade:
I've recently started using CMake for all my projects because it allows me to easily distribute my programs to my friends. What I want to do is set CodeBlocks so that clicking compile would run the following:

cmake .
make

and clicking rebuild would run:

cmake .
make clean
make

However, I can't even get CodeBlocks to even do anything with the Makefile generated by cmake, let alone make it do the cmake step before hand. I've enabled a custom makefile and it definitely exists in the same directory as the codeblocks project. Does anyone know how I can achieve what I want?

DrewBoo:
It sounds like you want to go to Project->Build Settings and head to the "make" commands tab at the end.

Navigation

[0] Message Index

Go to full version