Author Topic: Cmake generating Code Blocks project file not working  (Read 6673 times)

Offline unludo

  • Single posting newcomer
  • *
  • Posts: 2
Cmake generating Code Blocks project file not working
« on: February 13, 2012, 05:28:14 pm »
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!

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Cmake generating Code Blocks project file not working
« Reply #1 on: February 13, 2012, 06:54:42 pm »
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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Cmake generating Code Blocks project file not working
« Reply #2 on: February 13, 2012, 07:00:41 pm »
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++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline unludo

  • Single posting newcomer
  • *
  • Posts: 2
Re: Cmake generating Code Blocks project file not working
« Reply #3 on: February 15, 2012, 04:19:44 pm »
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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Cmake generating Code Blocks project file not working
« Reply #4 on: February 15, 2012, 05:41:00 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++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org