News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Cmake generating Code Blocks project file not working

Started by unludo, February 13, 2012, 05:28:14 PM

Previous topic - Next topic

unludo

Hello,

I am generating a project file with CMake. It generates a makefile which builds a working console application. It also generates a cbp file.

When opening Code Blocks, the project files are present.  But when trying to build or run I run into issues.

Am I supposed to adapt what is generated by cmake?

thank you!

Jenna

The cmake-created projects should work without tweaking anything in your C::B setup as far as I know.
If not, there might be something wrong with your cmake setup, but this would be beyond the scope of our forum.

stahta01

You Compiler Toolchain needs setup so it can do CB Makefile project.
This mainly means the make command must be valid.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

unludo

I don't understand, my cmake conf file is working correctly to produce my executable; it also generates a cbp file but when opening it, the include and library paths, and the list of libraries are not set in CB.

So what appears as smooth under command line does not work with CB?

Do I miss something?

Thank you.

stahta01

Quote from: unludo on February 15, 2012, 04:19:44 PM
Do I miss something?

Yes, CMake DOES NOT generate normal CB Project files; instead it generates makefiles and creates an CB project file that uses that makefile.
Therefore, you need to verify the Toolchain is set up right to use a Makefile CB project instead of a normal CB project.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]