Commit Graph

65 Commits

Author SHA1 Message Date
Patrick Boettcher
0d8273fa32 Merge branch 'upstream-vim-cmake-syntax'
* upstream-vim-cmake-syntax:
  vim-cmake-syntax 2017-05-02 (15526199)
2017-05-02 17:34:53 +02:00
Christian Pfeiffer
2a207aaca1 separgs: Add a NATIVE_COMMAND mode 2017-04-26 20:34:06 +02:00
John Donoghue
7788db9c4e cmake.m4: do not set _XXXFLAGS or _LIBS var if already set
* Auxiliary/cmake.m4 (CMAKE_FIND_PACKAGE): change var tests from -n to -z
  to check if var is already set before calling cmake

Fixes: #14460, #16663
2017-02-23 07:16:16 -05:00
Jamie Snape
0618ddf6b1 Add properties to run the cpplint style checker with the compiler
Create a `<LANG>_CPPLINT` target property (initialized by a
`CMAKE_<LANG>_CPPLINT` variable) to specify a `cpplint` style checker
command line to be run along with the compiler.
2017-01-23 14:47:13 -05:00
Konstantin Podsvirov
da0e3f9096 install: Configurable DESTINATION for the cmake.m4 file
The DESTINATION changed from share/aclocal to ${CMAKE_XDGDATA_DIR}/aclocal.
2016-11-15 23:17:59 +03:00
Betsy McPhail
3a523eec78 ctest_memcheck: Add DEFECT_COUNT option to capture defect count 2016-11-09 15:34:07 -05:00
Brad King
86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Ruslan Baratov
0f424c3d07 ExternalProject: Add HTTP_HEADER 2016-09-19 16:05:12 +03:00
Ruslan Baratov
e1ca117332 ExternalProject: Add HTTP_{USERNAME,PASSWORD} 2016-09-15 07:52:54 +03:00
Brad King
25c01cf0b0 Aux: Install vim-cmake-syntax files with CMake 2016-08-17 09:11:47 -04:00
Brad King
e3ac68cfbf Merge branch 'upstream-vim-cmake-syntax' into import-vim-syntax
* upstream-vim-cmake-syntax:
  vim-cmake-syntax 2016-08-16 (e782679c)
2016-08-17 09:11:19 -04:00
Brad King
f21a823598 Aux: Drop vim files prior to import of third-party version 2016-08-17 09:11:13 -04:00
Sylvain Joubert
fe7f117ad2 bash-completion: Fix cmake -E lookup
In case of long '<command> <args...>' the description text is wrapped
and indented on the next line.
Avoid taking these lines into account by explicitly requiring the third
character to be a non-space.
2016-08-05 08:54:09 -04:00
Brad King
5f99e61cad Merge topic 'emacs-mode-compilation-warning'
82388543 cmake-mode.el: Replace use of obsolete function (since Emacs 24.3).
ca684ccb cmake-mode.el: Fix byte-compilation warnings.
2016-08-01 15:15:39 -04:00
Jostein Kjønigsen
82388543d2 cmake-mode.el: Replace use of obsolete function (since Emacs 24.3). 2016-08-01 15:13:43 -04:00
Jostein Kjønigsen
ca684ccb46 cmake-mode.el: Fix byte-compilation warnings. 2016-07-26 14:41:02 +02:00
Ben Boeckel
cd7ed47c4a Aux: highlight commands using Function
These are closer to functions than anything else. Also change the other
groups which were highlighted with Function to other groups.
2016-07-22 12:33:23 -04:00
Ben Boeckel
bca8be583e Aux: sort the highlighting list 2016-07-22 12:32:40 -04:00
Ben Boeckel
7decbe8ffb Aux: highlight CMAKE_{CMAKE,CPACK}_COMMAND variables 2016-07-22 12:32:05 -04:00
Ben Boeckel
2b57b13920 Aux: highlight modules using Include
They are closer to Include than generic preprocessor lines.
2016-07-22 12:31:26 -04:00
Ben Boeckel
8ac4e2cfa2 Aux: highlight conditiona and repeat commands differently 2016-07-22 12:30:57 -04:00
Ben Boeckel
3b3bd880a3 Aux: highlight deprecated commands as warnings 2016-07-22 12:30:44 -04:00
Ben Boeckel
481f8cf1cc Aux: remove unused highlight links 2016-07-22 12:24:23 -04:00
Ben Boeckel
ffa44a39c9 Aux: highlight Lua-style comments 2016-07-22 12:23:53 -04:00
Ben Boeckel
29eeb9a8fd Aux: check spelling in comments 2016-07-22 12:23:16 -04:00
Patrick Boettcher
500f67e546 Aux: update vim-syntax-highlighting
This commit updates the vim-syntax-file. It is still not complete, but contains much more keywords,
built-in variables. Generator expressions are highlighted as well.

This file is generated from a script which parses the --help
output of cmake 3.5.

Imported from here: https://github.com/pboettch/vim-cmake-syntax

Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de>
2016-07-21 16:48:55 +02:00
Eric NOULARD
797c3c54e8 bash-completion: Add cpack --help-{manual,module,policy,property} 2016-06-10 10:46:33 -04:00
Eric NOULARD
b08cae9b0e bash-completion: Add ctest --help-{manual,module,policy,property,variable} 2016-06-10 10:46:19 -04:00
Eric NOULARD
48cb388ead bash-completion: Fix cmake --help-policy lookup 2016-06-10 10:45:25 -04:00
Eric NOULARD
f67afbdc4a bash-completion: Add cmake --help-manual 2016-06-10 09:54:29 -04:00
Taylor Braun-Jones
f12b899f4e cmake-mode.el: Make cmake-tab-width a customizable variable 2016-05-10 13:50:26 -04:00
Julian Schmidt
9dc384f662 cmake-mode.el: Fix help completion item lists with CMake >= 3.0 (#16019)
We run `cmake --help-*-list` to get a list of items for completion.
Since CMake < 3.0 always printed "cmake version ..." on the first line
of the output we have previously ignored the first line.  However, CMake
3.0 and above do not print the version line so we should not ignore the
first line or we miss one item.

Ideally we should filter the first line out if it is "cmake version ..."
in order to support CMake < 3.0 cleanly, but at worst the version line
will show up as a completion option so simply including the first line
is good enough for now.
2016-03-16 13:32:57 -04:00
Kevin Burge
47f4b3b662 cmake-mode.el: unscreamify symbols instead of words
cmake-unscreamify-buffer should unscream more than just
words. For example:

CHECK_FUNCTION_EXISTS (...)
2015-10-08 15:03:11 -04:00
Kevin Burge
a935745d07 cmake-mode.el: treat keywords as symbols
Symbols such as "CHECK_FUNCTION_EXISTS" should not trigger an open block
(due to containing the "word" FUNCTION).  Fix this regression caused by
commit v3.4.0-rc1~292^2~3 (cmake-mode.el: Use `rx' for regexps,
2015-07-23).
2015-10-08 14:21:20 -04:00
Brad King
da7276cf94 Replace http://www.cmake.org URLs with https://cmake.org
The latter is now the preferred URL for visiting cmake.org with a
browser.  Convert using the shell code:

 git ls-files -z | xargs -0 sed -i 's|http://www\.cmake|https://cmake|g'
2015-09-25 15:47:39 -04:00
Roy Crihfield
64e6bc5ca3 cmake-mode.el: Refine variable font-lock
Simplify regexp for variable names, and allow more legal characters.
Remove `$ *` as legal chars, and allow `- + / .` in names.
2015-08-14 10:16:22 -04:00
Roy Crihfield
758664b7ad cmake-mode.el: Fix function name font-lock
Allow space separating name and opening parenthesis.
2015-08-13 15:24:18 -04:00
Roy Crihfield
5593f28fac cmake-mode.el: Derive cmake-mode from prog-mode
Emacs 24 and above support a generic "prog-mode" to simplify definition
of programming modes.  Derive "cmake-mode" from it since we are a
programming mode.
2015-07-27 09:40:54 -04:00
Roy Crihfield
41d6044bcf cmake-mode.el: Add font-lock for keywords and variables
Control flow keywords will now be highlighted as such.  Variable names
will be also be recognized.  Adjust function name highlighting to work
in places other than the start of a line.
2015-07-27 09:40:07 -04:00
Roy Crihfield
7987d9857e cmake-mode.el: Rename function to be consistent
unscreamify-cmake-buffer => cmake-unscreamify-buffer

While at it, wrap the operation in (save-excursion).
2015-07-27 09:39:42 -04:00
Roy Crihfield
63de609ef1 cmake-mode.el: Use `rx' for regexps
This allows the keywords be defined in a list and reused in different
regexps.
2015-07-27 09:39:09 -04:00
Roy Crihfield
9d5082b26e cmake-mode.el: Minor clean-up
Superficial changes to use more conventional Emacs Lisp idioms.
2015-07-27 09:38:31 -04:00
Jostein Kjønigsen
b24b58bb7b cmake-mode.el: Add support for prog-mode hooks (#15521)
Since version 24, Emacs supports a generic mode called prog-mode.  Like
all other modes it has its own mode-hook, prog-mode-hook.  For Emacs
users it is common to provide all your generic programming-mode related
customizations in this mode-hook.

cmake-mode is definitely a programming-mode and should support calling
this hook. There are two ways to make that happen:

* Make your major-mode a derived-mode from prog-mode.
* Manually calling the hook upon mode-activation.

Implementing a derived mode may be the most proper thing to do, but that
may require quite a few structural changes.  For now just call the hook
explicitly if it exists.  This should cover much of what users need.
2015-06-23 08:48:01 -04:00
Gaëtan Lehmann
2ecf168f19 bash-completion: Avoid using _init_completion when not defined
With the current version of homebrew one gets:

   bash: _init_completion: command not found

Avoid this by initializing manually when the function is not defined.
2015-04-22 09:40:17 -04:00
Brad King
481c5fd31e Merge topic 'emacs-mode-fix-word-at-point'
3a147e1b cmake-mode.el: Re-add explicit call to require thingatpt
2015-01-20 09:20:04 -05:00
Peter Vasil
3a147e1b62 cmake-mode.el: Re-add explicit call to require thingatpt
Usually it is not needed to call '(require 'thingatpt')' explicitly
because the function 'symbol-at-point' is in autoloaded but to be sure
to have the function loaded in every case, require thingatpt.
2015-01-19 13:53:38 -05:00
Brad King
953272b725 Merge topic 'fix-cmake-org-links'
91fbcda2 Help: Update cmake.org links to avoid redirects
2015-01-19 09:43:18 -05:00
Peter Vasil
ca80598eca cmake-mode.el: Fix extracting keyword at point in cmake-help
Since commit v3.1.0-rc2~1^2~1 (cmake-mode.el: syntax of '_' should be
treated as symbol, 2014-11-12) the 'word-at-point' function does not
extract the whole keyword anymore if it contains an '_', because
'forward-word' stops at '_'.  Use 'symbol-at-point' to extract a whole
keyword even if there is an '_'.
2015-01-19 09:14:10 -05:00
William Lynch
91fbcda28f Help: Update cmake.org links to avoid redirects
Some links to cmake.org now redirect, so link to the new pages directly.
2015-01-16 15:50:44 -05:00
Syohei YOSHIDA
30f14aebee cmake-mode.el: syntax of '_' should be treated as symbol
Word commands, such as foward-word(M-f), backward-kill-word(M-backspace),
don't work well like other major-modes if syntax of '_' is treated as "word".

Tested-by: Guillaume Papin <guillaume.papin@parrot.com>
2014-11-12 08:40:14 -05:00