MantisBT - CMake
View Issue Details
0013664CMakeCMakepublic2012-11-08 16:132016-06-10 14:31
Dave Abrahams 
Kitware Robot 
normalminoralways
closedmoved 
MacMacOS X10.8
 
 
0013664: Emacs integration should be easier
Integrating CMake with compilation-mode is obscenely difficult
It's not much code, but the fact that we have to load and trawl the cmake_install.cmake file is just... wrong.

(defun cmake-project-filename ()
  (let ((filename (match-string-no-properties 1)))
    (save-match-data
      (with-temp-buffer
        (insert-file-contents-literally "cmake_install.cmake")
        (goto-char (point-min))
        (re-search-forward "Install script for directory: \\(.+\\)")
        (cons filename (match-string-no-properties 1))))))

(push 'cmake compilation-error-regexp-alist)
(push '(cmake "^\\(?:CMake Error at \\| \\)\\(.+?\\):\\([0-9]+\\) ([A-Za-z_][A-Za-z0-9_]*)"
              (cmake-project-filename) 2)
      compilation-error-regexp-alist-alist)
 
No tags attached.
parent of 0013548closed Eric NOULARD Updated cmake-mode.el 
related to 0014108closed Kitware Robot add test to cover assumption of the cmake --help-command output 
? cmake-init.el (285) 2014-02-28 16:23
https://public.kitware.com/Bug/file/5086/cmake-init.el
Issue History
2012-11-08 16:13Dave AbrahamsNew Issue
2013-03-28 01:30Dave AbrahamsNote Added: 0032714
2013-03-28 01:40Dave AbrahamsNote Added: 0032715
2013-04-01 10:25Eric NOULARDNote Added: 0032737
2013-04-23 04:12Eric NOULARDRelationship addedrelated to 0014108
2013-04-23 04:14Eric NOULARDRelationship addedparent of 0013548
2014-02-28 16:23Orion PoplawskiFile Added: cmake-init.el
2014-02-28 16:26Orion PoplawskiNote Added: 0035222
2016-06-10 14:28Kitware RobotNote Added: 0042146
2016-06-10 14:28Kitware RobotStatusnew => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0032714)
Dave Abrahams   
2013-03-28 01:30   
Seriously, you do *line-wrapping* in your error messages? I can’t believe this; that just makes everything so much worse.

Will someone please look at this bug and/or ask me for more information?
(0032715)
Dave Abrahams   
2013-03-28 01:40   
OK, I was wrong about the line wrapping. But, c’mon, relative paths? Why can’t you use an error message format that matches some popular compiler?
(0032737)
Eric NOULARD   
2013-04-01 10:25   
Hi Dave,

Could you provide an example.
i.e.

1) the error message you get
2) the one you'd rather get

Concerning emacs things, may be you can provide a patch
for the Docs/cmake-mode.el file you can find in the CMake source?
(0035222)
Orion Poplawski   
2014-02-28 16:26   
Here's what we are doing in the Fedora cmake package:

- install cmake-mode.el to /usr/share/emacs/site-lisp/cmake/cmake-mode.el
- /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(progn (setq load-path (cons "." load-path)))' -f batch-byte-compile /usr/share/emacs/site-lisp/cmake/cmake-mode.el

In cmake-indent:
~/redhat/BUILDROOT/cmake-3.0.0-0.1.rc1.fc21.x86_64/usr/share/emacs/site-lisp/cmake/cmake-mode.el
:142:50:Warning:
    reference to free variable `cmake-tab-width'

In cmake-command-run:
~/redhat/BUILDROOT/cmake-3.0.0-0.1.rc1.fc21.x86_64/usr/share/emacs/site-lisp/cmake/cmake-mode.el
:282:8:Warning:
    `toggle-read-only' is an obsolete function (as of 24.3); use
    `read-only-mode' instead.

- install cmake-init.el (attached) to /usr/share/emacs/site-lisp/site-start.d/cmake-init.el
(0042146)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.