Skip to content
Snippets Groups Projects
Commit b1ac40c5 authored by Jö Fahlke's avatar Jö Fahlke
Browse files

Merge branch 'feature/cmake-support-in-compilation-mode' into 'master'

[doc][buildsystem] Explain how to get Emacs to recognize errors from CMake.



See merge request !71
parents 1b86b0bf 01e2ef79
No related branches found
No related tags found
No related merge requests found
......@@ -270,6 +270,22 @@ As already said, CMake is merely a build system generator with multiple backends
a different generator. Check :code:`cmake --help` for a list of generators. You can then add the :code:`-G` to the :code:`CMAKE_FLAGS` in your opts file.
Note that the generator name has to match character by character, including case and spaces.
To configure highlighting of CMake errors in Emacs' compilation mode, include
the following in your :code:`~./emacs` (see the `Emacs bug
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22944>`_):
.. code-block:: elisp
(setq compilation-error-regexp-alist-alist
`((cmake "^CMake \\(?:Error\\|\\(Warning\\)\\) at \\(.*\\):\\([1-9][0-9]*\\) ([^)]+):$"
2 3 nil (1))
(cmake-info "^ \\(?: \\*\\)?\\(.*\\):\\([1-9][0-9]*\\) ([^)]+)$"
2 3 nil 0)
. ,compilation-error-regexp-alist-alist))
Then customize the option :code:`compilation-error-regexp-alist` and add the
two predefined symbols :code:`cmake` and :code:`cmake-info` to the list.
.. _cxxflags:
I usually modify my CXXFLAGS upon calling make. How can I do this in CMake?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment