Modules: Add comment and copyright notice validation to readme.txt

Document for module authors how to format the copyright notice and
test it.  Also provide a hint for previewing the module documentation
formatting.
This commit is contained in:
Brad King 2011-04-01 13:46:36 -04:00
parent 0315d3b66f
commit ede46d9d91
1 changed files with 22 additions and 0 deletions

View File

@ -64,10 +64,32 @@ For example:
# VAR_REALLY_COOL - cool right?
#
Test the documentation formatting by running "cmake --help-module FindXXX".
Edit the comments until the output of this command looks satisfactory.
To have a .cmake file in this directory NOT show up in the
modules documentation, you should start the file with a blank
line.
After the documentation, leave a *BLANK* line, and then add a
copyright and licence notice block like this one:
#=============================================================================
# Copyright 2009-2011 Your Name
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
The layout of the notice block is strictly enforced by the ModuleNotices test.
Only the year range and name may be changed freely.
A FindXXX.cmake module will typically be loaded by the command
FIND_PACKAGE(XXX [major[.minor[.patch[.tweak]]]] [EXACT]