Author Topic: CMake SE project gen - no clue  (Read 189 times)

namklak

  • Community Member
  • Posts: 13
  • Hero Points: 0
CMake SE project gen - no clue
« on: September 14, 2018, 04:48:13 pm »
Hi,
I was looking for a tool (or maybe this is native to SE and I am ignorant) that will create a SE project from just a makefile.  I have to support and view a lot of code bases, and it's a pain to get all the files from misc SDKs, folders, etc added to the project.
I thought this might be the answer:
https://community.slickedit.com/index.php/topic,15318.msg58313.html#msg58313
but when I tried to run it, I got an error that the project did contain file CMakeLists.txt - where does this file come from?    I asked SE support, and they said the this next link contains the the "Cmake" file, which just confused me more:
https://community.slickedit.com/index.php/topic,15214.msg57789.html#msg57789

Is CMake what I need to create a SE Project from a Makefile?

If Cmake is the answer, any help please?

Thanks,
Namklak

rowbearto

  • Senior Community Member
  • Posts: 1190
  • Hero Points: 76
Re: CMake SE project gen - no clue
« Reply #1 on: September 14, 2018, 05:19:53 pm »
Not sure such a tool exists.

Cmake is a tool that can generate makefile and/or SE projects and/or many other types of projects. It generates these things from a CMakeLists.txt file.

If you have your own makefile that you maintain and keep under source control then you are not using CMake, and CMake won't help you for that.

If you are able to switch to using CMake to generate your makefile, that is one solution.

Otherwise, I'm not aware of any tool that can do what you want.

In my company we have our own maintained makefiles, and I maintain an ".ini" file that has all the directories and wildcarded file patterns that should be in my SlickEdit project. I create a blank SE project/workspace and then run a special macro that populates my SE project with all the source files. SE also has built in "wildcard adding", but I like the special macro better because it saves the files (after scanning) into the SE project so that when I reopen SE it won't scan again. This macro is here:

https://github.com/rbresalier/sync_project_with_scm

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2522
  • Hero Points: 367
Re: CMake SE project gen - no clue
« Reply #2 on: September 14, 2018, 07:52:33 pm »
It may not be perfect for your scenario, but SlickEdit does support opening a workspace from a Makefile.

Project > Open Other Workspace > Makefile...

It will scan your Makefile for build targets and also try to deduce the list of source files.  Since Makefiles are built in a lot of different ways, and certain make implementations have non-standard extensions, this feature can be kind of hit or miss, but you certainly can give it a test drive.  Performance can be a bit hit or miss with this feature, because SlickEdit will rescan the makefile every time the workspace is opened to determine if new files have been added to the project.

The other option is to create a generic C/C++ project and specify that it is to be built using a Makefile in Project Properties.

Neither of these solutions will give you integrated debugging straight out of the box, because we can't predict in what magical corner of the universe the Makefile will place the executable.  So you may have to make a couple more mods in Project Properties to get that going.

namklak

  • Community Member
  • Posts: 13
  • Hero Points: 0
Re: CMake SE project gen - no clue
« Reply #3 on: September 14, 2018, 07:57:31 pm »
Okay, thanks for the two good responses - input noted.