Commit Graph

19 Commits

Author SHA1 Message Date
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
Daniel Pfeifer efed6468ed fix a load of include-what-you-use violations 2016-09-03 08:04:56 -04:00
Tobias Hunger a354f60ce0 Refactor extra generator registration to use factories
This will allow additional information about the availability
and capabilities of extra generators to be queried without
actually creating them.

Instead of a static NewFactory() method like the main generator
factories have, use a static GetFactory() method to get a pointer to a
statically allocated extra generator factory.  This simplifies memory
management.
2016-08-03 09:43:00 -04:00
Daniel Pfeifer a7a9239096 mark functions with CM_OVERRIDE 2016-06-27 23:24:38 +02:00
Kitware Robot d9fd2f5402 Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2016-05-16 16:05:19 -04:00
Stephen Kelly b92d0b2c94 Sublime: Port API to cmGeneratorTarget. 2015-10-24 09:19:54 +02:00
Stephen Kelly a143d4ac60 Sublime: Port some API to cmGeneratorTarget. 2015-10-12 18:39:59 +02:00
Ben Boeckel 1a1b737c99 stringapi: Use strings for generator names 2014-03-08 13:05:38 -05:00
Ben Boeckel fabf1fbabb stringapi: Use strings in target name 2014-03-08 13:05:31 -05:00
Robert Maynard 4760eade42 Remove ability to generate sublime clang files.
SublimeClang is a optional plugin to SublimeText and I felt it
shouldn't be part of the generator for the following reasons:

1. Reduces the amount of sublime and sublimeClang specific
   code we have to maintain inside CMake.
2. In testing the SublimeClang commands generated did not work
   for the VTK project.

For people that do want this feature I recommend that they
looking into https://gist.github.com/robertmaynard/4724705 for a
way to use CMAKE_EXPORT_COMPILE_COMMANDS to generate JSON files
that can be used by SublimeClang.
2013-02-19 14:43:20 -05:00
Morné Chamberlain 089d9ccdce SublimeText 2 Gen: Set the sublimeclang_options_script property.
The sublimeclang_options_script property is now set in the project
file. It is set to execute a python script that reads the JSON options
file to get options per source file. Python must be installed and in the
path for this feature to work from Sublime Text.
2012-11-24 20:19:35 +02:00
Morné Chamberlain 304b885d36 Sublime Text 2 Gen: Per-source Compile flags are now saved in a separate file.
We no longer write sublimeclang_options to the project file, but instead
write a separate .sublimeclang-options JSON file that contains a map
of source file paths to compile flags for that file.
2012-11-11 22:07:49 +02:00
Morné Chamberlain 90bcb77956 SublimeText2 Gen: Improved use of define, include flags from CMAKE_C(XX)_FLAGS
Both define and include flags from CMAKE_C(XX)_FLAGS are now included in
SublimeClang options.

Include directories are now used with absolute paths instead of relative
paths since CMake generated build trees cannot be moved anyway.
2012-11-04 16:15:04 +02:00
Morné Chamberlain 8670cbe166 Define flags in CMAKE_C(XX)_FLAGS are now included in SublimeClang settings.
Changed the the SublimeText2 generator name to Sublime Text 2.

Fixed a minor issue where if the build directory was outside of the source
directory an unnecessary folder_exclude_pattern was generated in the
Sublime Text 2 project file.
2012-10-18 22:54:19 +02:00
Morné Chamberlain 6742ee747f The generator no longer generates an explicit list of source files.
Now the source directory is simply added to the project file,
with the output/build directory excluded.
2012-10-14 10:46:29 +02:00
Morné Chamberlain cd76ec3e22 Added and cleaned up some comments. 2012-10-13 12:54:51 +02:00
Morné Chamberlain 4d585b109d Cleaned up the Sublime Text 2 Generator code a bit. 2012-10-13 09:47:50 +02:00
Morné Chamberlain 32f79024ba Added some support for sublimeclang_options in the generated project file.
This adds -I include path flags and -D define flags for sublimeclang.
The current problem with this is that these flags cannot be set per
target (build_system in sublime text), it can only be set project
wide. Currently all of the include paths and compiler definitions from
ALL of the targets are used (with duplicates removed). This could be
problematic in some cases (conflicting compiler definitions among targets).
2012-10-13 09:47:50 +02:00
Morné Chamberlain b8457ad18b Added a generator for Sublime Text 2 project files.
The generator adds all list and source files for each defined
project. The generated project files also include build_system
entries that run the platform-specific make on the generated
Makefiles. A build_system entry is created for each target
that was defined in the CMakeLists.txt files.

At the moment this has only been tested with C/C++ projects.
2012-10-13 09:47:50 +02:00