From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?J=C3=B6?= Fahlke Newsgroups: gmane.emacs.bugs Subject: bug#22944: 24.4; Wishlist: Support for cmake in compilation-mode Date: Sun, 10 Apr 2016 17:33:11 +0200 Message-ID: <20160410153311.GA4361@paranoia> References: <87si013rsh.fsf@jorrit.de> <87shzy75ia.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hHWLQfXTYDoKhP50" X-Trace: ger.gmane.org 1460302453 5152 80.91.229.3 (10 Apr 2016 15:34:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Apr 2016 15:34:13 +0000 (UTC) Cc: 22944@debbugs.gnu.org To: =?UTF-8?Q?=C3=93scar?= Fuentes Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 10 17:34:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1apHNK-0000s8-U6 for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Apr 2016 17:34:11 +0200 Original-Received: from localhost ([::1]:35377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apHNK-0004Sl-7K for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Apr 2016 11:34:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apHNG-0004Ql-0e for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2016 11:34:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apHNC-0003ou-Nm for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2016 11:34:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apHNC-0003og-Jm for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2016 11:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1apHNC-0004PE-BO for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2016 11:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?J=C3=B6?= Fahlke Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Apr 2016 15:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22944 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22944-submit@debbugs.gnu.org id=B22944.146030239716865 (code B ref 22944); Sun, 10 Apr 2016 15:34:02 +0000 Original-Received: (at 22944) by debbugs.gnu.org; 10 Apr 2016 15:33:17 +0000 Original-Received: from localhost ([127.0.0.1]:57379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apHMT-0004Nx-5S for submit@debbugs.gnu.org; Sun, 10 Apr 2016 11:33:17 -0400 Original-Received: from mail.xeneris.net ([88.198.30.130]:43302 helo=mx2.xeneris.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apHMR-0004Np-EF for 22944@debbugs.gnu.org; Sun, 10 Apr 2016 11:33:16 -0400 X-No-Auth: unauthenticated sender X-No-Auth: unauthenticated sender Original-Received: from paranoia (localhost.localdomain [127.0.0.1]) by mx2.xeneris.net (Postfix) with ESMTPS id E09EBC307F13; Sun, 10 Apr 2016 17:33:11 +0200 (CEST) Original-Received: from joe by paranoia with local (Exim 4.84_2) (envelope-from ) id 1apHMN-0007v7-CA; Sun, 10 Apr 2016 17:33:11 +0200 Content-Disposition: inline In-Reply-To: <87shzy75ia.fsf@wanadoo.es> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:116320 Archived-At: --hHWLQfXTYDoKhP50 Content-Type: multipart/mixed; boundary="MGYHOYXEY6WxJCY8" Content-Disposition: inline --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am Thu, 10. Mar 2016, 15:49:01 +0100 schrieb =D3scar Fuentes: >=20 > jorrit@jorrit.de (J=F6 Fahlke) writes: >=20 > > 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. >=20 > 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) recogni= ze 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 acr= oss note lines of the second format at some point. Regards, J=F6. --=20 Jorrit (J=F6) Fahlke, Institute for Computational und Applied Mathematics, University of M=FCnster, Orleans-Ring 10, D-48149 M=FCnster 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 --MGYHOYXEY6WxJCY8 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Add-CMake-support-in-compilation-mode-Bug-22944.patch" Content-Transfer-Encoding: quoted-printable =46rom f86584c59f3ca463e439c5a9972b294744492967 Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?J=3DC3=3DB6=3D20Fahlke?=3D 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. =0C * Changes in Specialized Modes and Packages in Emacs 25.2 =20 +** Compilation mode + +--- +*** Messages from CMake are now recognized. + ** eww =20 +++ 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 =20 =20 +* 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 separ= ate + 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= =2Ecmake:556 (include) + /home/joe/Projekte/EXA-DUNE/patches/dune-common/cmake/modules/DuneMacros= =2Ecmake: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 & G= NAT (July 94) =20 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)) =20 + (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/com= pile-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") --=20 2.1.4 --MGYHOYXEY6WxJCY8-- --hHWLQfXTYDoKhP50 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIVAwUBVwpyN+mx9CKgc0OWAQiFKhAAv/tOkqvMGyYE5L2c5e9ZLv2230z4yPgW NrhxqPwa+5kt72/1cYQSw2WU9/UZ0FMvJkIPY6jHzbUA6V85Rrjx5xn8d3XoY9/S vQB65lnTU3MSUAihtWe0UCEsltvAuMooZMErZd+avuHugKGTGKVQFJbI87PePu5v Mw1Ax+xT+QRaDAC1vjJWrG4YNyekUfcGUsiT46iVoj+lFirkCrrk9wYj3txJrmPk 4gFicz7160zUsA08NA9SuyjDhMkjWG935FxTp3mqwU0Jn7yRv19iHQu13PRYJr+Y WyS9ie48FpPYJpABjyCJAQJLuUHcwWAsUQSJR7BP1wFpsZpXzjWacTJ4H31MhKLb ZOQf7/y/eN6iFbQ6HXKl3p7jQUNIlCCC+urmjXbZa8ZRkMoUjPM7qRb+6+ksv1r0 FnZcMznEbvQzJ2do6tgHte8LV1nC3O38YgCkKpX+HV0sAfWepEReLWDPU7mvtEIv 5OR2arLzKfZ662p0xE4eDe+lV3i3JQwnFhlY9Lu+2M3QnCj4csWjRgqNrilAthtw YQuz1lSKZhqTKBTtovE/nRvRxXxoLCdWXZ1zsNJzRVUb6yJFtvN6UQSmsstlKBO1 diZiD+oCbdXPyIcOF22b5Zc8cLpuScKCcRBF2kIJakpkScegIGiyOaMVKQFKH9zE CaA7w2K8Jq0= =UNtp -----END PGP SIGNATURE----- --hHWLQfXTYDoKhP50--