Author Topic: CMake generated makefiles or projects  (Read 5355 times)

sdeans

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
CMake generated makefiles or projects
« on: July 13, 2012, 02:08:04 am »
I have seen a few posts requesting how to get SE to access the source files, when creating projects from makefiles that were generated by Cmake. There is a soulution for Visual Studios in that Cmake can generate visual studio solutions and SE can work with these solutions.

I have not seen any answer to the straight makefile base projects. Of course, what would be ideal is if CMake could generate SE projects.

Let me resate the actual issue. When makefiles that have been generated for the gcc tool chain by CMake are used by SE to create SE projects, SE can actually list and build the projects, but SE cannot locate the source files to view, edit, or debug.

Graeme

  • Senior Community Member
  • Posts: 2748
  • Hero Points: 340
Re: CMake generated makefiles or projects
« Reply #1 on: July 13, 2012, 12:58:38 pm »
Did you notice that a couple of people have posted in these forums that they have written a tool to generate SE projects from cmake files.  You could try sending them a personal message.

Have you examined the project (.vpj) file to see whether it contains a list of source files  - or does it just call make using the cmake make files?

If you look at a .vpj file that actually does contain a list of source files, you ought to be able to see how to "manually" modify a vpj file to add source files.  In slickedit project properties dialog on the file tab there is an import button that allows you to add files to a project using an externally generated list.  It's not documented in slick help how to use it but you can get an idea from this thread
http://community.slickedit.com/index.php/topic,2038.msg8533.html#msg8533


sdeans

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Re: CMake generated makefiles or projects
« Reply #2 on: July 23, 2012, 09:22:48 pm »
Thanks Graeme.

I did consider sending a message to them, but given it was several years and several versions ago, I figured a better more current solution might be available.

I have not looked at the .vpj file but I feel certain that it just calls make.

SE displays, in the Projects window, all of the projects and sub-projects and all of the source and header files. It just cannot find the actual source files.

Manually editing the .vpj file every time cmake regenerates the makefiles is not really a viable solution.

 

garion911

  • Senior Community Member
  • Posts: 200
  • Hero Points: 13
Re: CMake generated makefiles or projects
« Reply #3 on: July 24, 2012, 02:36:02 am »
I use cmake pretty regularly, and I just manually add my files to the VS project.. In my case, its not a big deal, as most of my projects are pretty simple.

I think the best solution would be to make cmake generate VS workspace/project files, in addition to the Makefiles... It already seems to do something similar with KDevelop (seen here: http://www.cmake.org/Wiki/CMake_Generator_Specific_Information)..

I have too many projects going on right now, otherwise I might give it a stab.

--John

sdeans

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Re: CMake generated makefiles or projects
« Reply #4 on: July 24, 2012, 11:42:53 pm »
Thanks Garion.

Yes, the ideal solution is to have a Cmake SE project generator.

Our build files are fairly involved, so manually maintaining the SE project files is not an option. KDevelop projects are my fall back if I cannot get SE to work.

I really only need SE for debugging as the actual source is on a shared windows drive mounted to my Linux machine. I can edit using Visual Studio solution (.sln) files on Windows. If SE could understand KDevelop projects, that would also be a solution.

I suspect that SE would be just fine using the gmake makefiles if the object (.o, etc.) files were built in the same dir with the source code. I keep the object files on the Linux drive.

I just need some way to explain to SE to substitute the root source dir for the root build dir.


My second issue is I cannot get WinDbg to work with SE, but that a different problem. (I just use Visual Studio for debugging.) I guess I’ll be stuck with KDevelop for debugging on Lynux.