bugGNU Octave - Bugs: bug #55901, Add CMakeLists.txt to .hgignore...

 
 

bug #55901: Add CMakeLists.txt to .hgignore for CLion support

Submitter:  Andrew Janke <apjanke>
Submitted:  Wed 13 Mar 2019 04:28:21 AM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 29 Mar 2019 04:51:43 PM UTC, comment #4: 

It's working. Thank you!

Andrew Janke <apjanke>
Fri 29 Mar 2019 04:35:29 PM UTC, comment #3: 

I checked in a change to ignore CMakeLists.txt here (https://hg.savannah.gnu.org/hgweb/octave/rev/ec0f2f745ea3).

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Fri 29 Mar 2019 03:59:36 PM UTC, comment #2: 

Basically, yeah. I do want to use it as more of an IDE, but just for code analysis and navigation; not for the actual build. What I do is generate a dummy CMakeLists.txt file that doesn't actually build anything useful, but pulls in all the various source directories as source files so CLion can recognize and parse them, which lets it do reference resolution and stuff like that.

Here's exactly what I do: I have this CMakeLists.txt file in my octave-BUILD repo: https://github.com/apjanke/octave-BUILD/blob/130785041cdbf666fd4719a67a34b8b0a420846a/CMakeLists.txt. I check out octave-BUILD next to my octave clone, and symlink octave/CMakeLists.txt to ../octave-BUILD/CMakeLists.txt. That won't get the project to actually build, but it does get CLion to pull in all the header files in the project so it can understand the code structure and do useful IDE stuff.

If there's no CMakeLists.txt, it will run, but it fails to recognize most of the source files as being actual source code in the project, and most of its features don't work.

Andrew Janke <apjanke>
Fri 29 Mar 2019 03:38:03 PM UTC, comment #1: 

Just checking that I understand this correctly.  Octave uses Autoconf as a build system, not CMake, so CLion shouldn't be particularly useful.  But, you would like to use it as your text editor, and it fails to run unless there is a file "CMakeLists.txt" in the top-level project directory?

Rik <rik5>
Group administrator
Wed 13 Mar 2019 04:28:21 AM UTC, original submission:  

Would you consider adding CMakeLists.txt to the .hgignore file, as a convenience for developers who want to use CLion to develop Octave?

CLion only works with CMake, so it requires a CMakeLists.txt to be present in the project directory. Octave can safely ignore this since it's not CMake-based. It's not feasible for users to add CMakeLists.txt to their global .hgignore file, because there are plenty of other projects that do use CMake and want CMakeLists.txt to be checked in to their repos.

Andrew Janke <apjanke>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #46512:  ignore-cmakelists.diff added by apjanke (752B - application/octet-stream - patch to ignore CMakeLists.txt)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by apjanke (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-29 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2019-03-13 apjanke Attached File- Added ignore-cmakelists.diff, #46512

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code