all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jö Fahlke" <jorrit@jorrit.de>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: 22944@debbugs.gnu.org
Subject: bug#22944: 24.4; Wishlist: Support for cmake in compilation-mode
Date: Sun, 10 Apr 2016 17:33:11 +0200	[thread overview]
Message-ID: <20160410153311.GA4361@paranoia> (raw)
In-Reply-To: <87shzy75ia.fsf@wanadoo.es>


[-- Attachment #1.1: Type: text/plain, Size: 1314 bytes --]

Am Thu, 10. Mar 2016, 15:49:01 +0100 schrieb Óscar Fuentes:
> 
> jorrit@jorrit.de (Jö Fahlke) writes:
> 
> > I wanted to get that out there.  If anyone wants to turn that into a
> > proper patch, feel free, otherwise I might find time to do that myself
> > later.
> 
> Please provide a proper patch and I will install it.

Hi!

Please find the patch attached.  It is in default "git format-patch"-format, I
hope that is OK.  git does not seem to support "diff -c" format (as per
"(emacs)Sending Patches").

There is one small issue: The regular expressions (after the patch) recognize
note lines of the form

"  cmake/modules/DuneGridMacros.cmake:19 (include)"

as well as

"  * cmake/modules/DuneGridMacros.cmake:19 (include)"

I was unable to reproduce examples of the second kind, so I did not put any
into etc/compilation.txt or the test, since I did not want to make them up.  I
took the regular expression from my ~/.emacs, so I'm pretty sure I came across
note lines of the second format at some point.

Regards,
Jö.

-- 
Jorrit (Jö) Fahlke, Institute for Computational und Applied Mathematics,
University of Münster, Orleans-Ring 10, D-48149 Münster
Tel: +49 251 83 35146 Fax: +49 251 83 32729

Of all the things I've lost, I miss my mind the most.
-- Ozzy Osbourne

[-- Attachment #1.2: 0001-Add-CMake-support-in-compilation-mode-Bug-22944.patch --]
[-- Type: text/x-diff, Size: 4008 bytes --]

From f86584c59f3ca463e439c5a9972b294744492967 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6=20Fahlke?= <jorrit@jorrit.de>
Date: Thu, 24 Mar 2016 18:22:43 +0100
Subject: [PATCH] Add CMake support in compilation-mode (Bug#22944)

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Add
regexps for matching CMake output.
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data): Add
CMake test cases.
* etc/compilation.txt (CMake): Add CMake examples.
---
 etc/NEWS                             |  5 +++++
 etc/compilation.txt                  | 26 ++++++++++++++++++++++++++
 lisp/progmodes/compile.el            |  7 +++++++
 test/lisp/progmodes/compile-tests.el |  7 +++++++
 4 files changed, 45 insertions(+)

diff --git a/etc/NEWS b/etc/NEWS
index 6ec82f8..efdb1a9 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -118,6 +118,11 @@ in these situations.
 \f
 * Changes in Specialized Modes and Packages in Emacs 25.2
 
+** Compilation mode
+
+---
+*** Messages from CMake are now recognized.
+
 ** eww
 
 +++
diff --git a/etc/compilation.txt b/etc/compilation.txt
index d26af20..4a15312 100644
--- a/etc/compilation.txt
+++ b/etc/compilation.txt
@@ -84,6 +84,32 @@ Warning: this expression should have type unit.
   File "/tmp/foo.py", line 10
 
 
+* CMake
+
+symbols: cmake cmake-info
+
+CMake Error at CMakeLists.txt:19 (hurz):
+  Unknown CMake command "hurz".
+CMake Warning at cmake/modules/UseUG.cmake:73 (find_package):
+  Could not find a package configuration file provided by "UG" (requested
+  version 3.11.0) with any of the following names:
+
+    UGConfig.cmake
+    ug-config.cmake
+
+  Add the installation prefix of "UG" to CMAKE_PREFIX_PATH or set "UG_DIR" to
+  a directory containing one of the above files.  If "UG" provides a separate
+  development package or SDK, be sure it has been installed.
+Call Stack (most recent call first):
+  cmake/modules/DuneGridMacros.cmake:19 (include)
+  /home/joe/Projekte/EXA-DUNE/patches/dune-common/cmake/modules/DuneMacros.cmake:556 (include)
+  /home/joe/Projekte/EXA-DUNE/patches/dune-common/cmake/modules/DuneMacros.cmake:694 (dune_process_dependency_macros)
+  CMakeLists.txt:22 (dune_project)
+
+
+-- Could NOT find UG (missing:  UG_DIR HAVE_UG)
+
+
 * Apollo cc, 4.3BSD fc & IBM RS6000/AIX xlc compiler & Microtec mcc68k & GNAT (July 94)
 
 symbol: comma
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 0b15a28..5bfd35e 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -161,6 +161,13 @@ compilation-error-regexp-alist-alist
 \\(?: characters? \\([0-9]+\\)-?\\([0-9]+\\)?:\\)?\\([ \n]Warning\\(?: [0-9]+\\)?:\\)?\\)"
      2 (3 . 4) (5 . 6) (7))
 
+    (cmake
+     "^CMake \\(?:Error\\|\\(Warning\\)\\) at \\(.*\\):\\([1-9][0-9]*\\) ([^)]+):$"
+     2 3 nil (1))
+    (cmake-info
+     "^  \\(?: \\*\\)?\\(.*\\):\\([1-9][0-9]*\\) ([^)]+)$"
+     1 2 nil 0)
+
     (comma
      "^\"\\([^,\" \n\t]+\\)\", line \\([0-9]+\\)\
 \\(?:[(. pos]+\\([0-9]+\\))?\\)?[:.,; (-]\\( warning:\\|[-0-9 ]*(W)\\)?" 1 2 3 (4))
diff --git a/test/lisp/progmodes/compile-tests.el b/test/lisp/progmodes/compile-tests.el
index 6821a6b..8961576 100644
--- a/test/lisp/progmodes/compile-tests.el
+++ b/test/lisp/progmodes/compile-tests.el
@@ -79,6 +79,13 @@ compile-tests--test-regexps-data
      1 nil 302 "\\lib\\python\\Products\\PythonScripts\\PythonScript.py")
     ("File \"/tmp/foo.py\", line 10"
      1 nil 10 "/tmp/foo.py")
+    ;; cmake cmake-info
+    ("CMake Error at CMakeLists.txt:23 (hurz):"
+     1 nil 23 "CMakeLists.txt")
+    ("CMake Warning at cmake/modules/UseUG.cmake:73 (find_package):"
+     1 nil 73 "cmake/modules/UseUG.cmake")
+    ("  cmake/modules/DuneGridMacros.cmake:19 (include)"
+     1 nil 19 "cmake/modules/DuneGridMacros.cmake")
     ;; comma
     ("\"foo.f\", line 3: Error: syntax error near end of statement"
      1 nil 3 "foo.f")
-- 
2.1.4


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

  reply	other threads:[~2016-04-10 15:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-08 15:36 bug#22944: 24.4; Wishlist: Support for cmake in compilation-mode Jö Fahlke
2016-03-10 14:49 ` Óscar Fuentes
2016-04-10 15:33   ` Jö Fahlke [this message]
2016-04-10 17:24     ` Óscar Fuentes
2016-04-11 13:27       ` Jö Fahlke
2016-04-11 23:07         ` Óscar Fuentes
2016-04-11 23:21           ` John Wiegley
2016-04-18 12:19             ` Óscar Fuentes
2016-04-18 15:46               ` Glenn Morris
2016-04-18 18:33               ` Eli Zaretskii
2016-04-19  0:26               ` Richard Stallman
2016-04-19  0:56                 ` John Wiegley
2016-04-19 23:50                   ` Richard Stallman
2016-04-20  0:16                     ` Óscar Fuentes
2016-04-20 23:46                       ` Richard Stallman
2016-04-20  0:20                     ` John Wiegley
2016-04-23  1:21         ` Óscar Fuentes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160410153311.GA4361@paranoia \
    --to=jorrit@jorrit.de \
    --cc=22944@debbugs.gnu.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.