Commit Graph

14940 Commits

Author SHA1 Message Date
Brad King 80a3273b5e Drop all documentation formatters except Usage
We now need only the Usage formatter to support command-line options
that print basic usage, and the supporting indented=>preformatted markup
processor to support CMake message formatting.  Drop all other
documentation formatters and move the remaining code up into the top
cmDocumentationFormatter class.
2013-10-16 09:22:35 -04:00
Brad King b336a1ebe4 Teach COMPATIBLE_INTERFACE_* checks to use Help .rst documents
These checks want to know if named target properties are builtin, which
is now known by checking the Help/prop_tgt directory.  (Previously the
check could be confused by a define_property call in the project.)
2013-10-16 09:22:35 -04:00
Brad King ec6df3675e Teach --help-* options to load documentation from .rst files
Install the Help directory next to Modules to make it available in CMake
distributions.  Use cmRST to read Help .rst documents and print them as
help output.

Add options

 --help-manual-list
 --help-manual

to list available manuals or print one of them.  Implement the options

 --help-commands
 --help-modules
 --help-policies
 --help-properties
 --help-variables

by mapping to the corresponding manual page.  Implement the options

 --help-command-list
 --help-module-list
 --help-policy-list
 --help-property-list
 --help-variable-list

by globbing the available Help .rst documents of the corresponding type
and reading their titles.  Implement the options

 --help-command
 --help-module
 --help-policy
 --help-property
 --help-variable

by globbing the matching Help .rst document(s) and printing them.
2013-10-16 09:22:35 -04:00
Brad King 25f2877eef Add class cmRST to do basic reStructuredText processing
Create a cmRST class to perform just enough reStructuredText processing
to support display of Help documents in human-readable text format.
This will be used to implement --help-* command-line options.

Support directives "include", "replace", "parsed-literal", "toctree"
(Sphinx), and "cmake-module" (CMake Sphinx Extension to scan .cmake
modules).  Support inline CMake Sphinx Domain roles to convert
cross-references to corresponding title text.  Support inline
substitutions defined by the "replace" directive, but keep it simple by
requiring replacements to be defined before use.

Add a CMakeLib "testRST" case to cover processing of supported
constructs and compare results against expected output.
2013-10-16 09:22:35 -04:00
Brad King 87cc62cab9 Drop "full" documentation output types
We will no longer support full documentation generation from executables
and will instead generate documentation with other tools.  Disable (with
a warning left behind) the command-line options:

 --copyright
 --help-compatcommands
 --help-full
 --help-html
 --help-man

Drop supporting code.  Drop manual sections generation from executables.
Remove internal documentation construction APIs.  Drop unused sections
See Also, Author, Copyright, Compat Commands, Custom Modules.
2013-10-15 14:12:49 -04:00
Brad King f85405f551 Add reStructuredText (RST) documentation formatter
Temporarily add a RST formatter to convert builtin documentation to .rst
source files.  This will be removed shortly after we use it to convert
documentation.

Teach the RST formatter to:

* Output preformatted blocks as reStructuredText "::" literal blocks.

* Output option lists as bullet lists with option names enclosed in
  reStructuredText ``literal`` quoting.

* Output individual documentation objects (commands, variables, etc.)
  in separate .rst files organized in directories by type.

Replace references to cmVersion::GetCMakeVersion() in builtin
documentation with the literal placeholder "|release|" that will be
defined as a substitution later.
2013-10-15 10:47:39 -04:00
Brad King 0d0fec1524 Drop CPack module documentation markup extraction
This will be replaced by alternative markup later.
2013-10-15 10:47:39 -04:00
Brad King 946f0efb7c Drop definition of internal property
The property __CMAKE_DELETE_CACHE_CHANGE_VARS_ is not meant for public
exposure.
2013-10-15 10:47:39 -04:00
Brad King 277bd1db98 Drop CMAKE_STRICT mode
With our modern development workflow it is less likely a property will
be added to C++ code without documentation.  This mode only existed to
support the DocTest which had very limited coverage of the properties
anyway.
2013-10-15 10:47:38 -04:00
Brad King 07b80021aa cmDocumentation: Drop version output from usage and text help
Drop the "cmake version ..." line from the top of usage and text help
formats.  Print it only when requested with --version or similar option.
2013-10-15 10:46:54 -04:00
Brad King 6e68bc2273 cmake: Add --help-policy-list option
All the other --help-<item> options have a corresponding option
--help-<item>-list.  Add one for --help-policy.
2013-10-15 10:46:54 -04:00
Brad King c9a5f34bd7 Cleanup use of CMake version in install destinations
Factor the CMAKE_DATA_DIR, CMAKE_DOC_DIR, and CMAKE_MAN_DIR selection
out of CMakeLists.txt and into a Source/CMakeInstallDestinations.cmake
script.  Load the script from the original location of the code.

Cache the destination values as empty strings so we know if the user
sets them explicitly.  If not, then compute defaults based on the
platform and full CMake version string.  By not caching the versioned
defaults, we can change them in a single build tree as the version
changes.

Remove duplication of the install destination defaults from the
bootstrap script.  Cache empty defaults there too.  Parse from the CMake
code the default values to report in the help output.  Keep the CMake
code in a structured format to make this reliable.
2013-10-15 10:46:54 -04:00
Brad King c72f8513f7 Factor CMake version logic into dedicated module
Move logic to compute CMake_VERSION out of the top-level CMakeLists.txt
file to a dedicated Source/CMakeVersionCompute.cmake module and include
it from the original location.  This will allow it to be re-used.
2013-10-15 10:46:53 -04:00
Brad King cb51088f75 Merge topic 'doc-list-append-nothing'
eec7834 list: Fix docs for APPEND to show that elements are optional
2013-10-15 09:33:28 -04:00
Brad King 69fd12583c Merge topic 'wix-extra-sources'
2e6cadd CPackWiX: allow user supplied extra sources, objects and libraries
2013-10-15 09:33:22 -04:00
Brad King cd36929c27 Merge topic 'wix-deterministic-ids'
3a4a748 CPackWiX: generate deterministic ids for directories, components and files
2013-10-15 09:33:15 -04:00
Brad King b31ca93ba2 Merge topic 'target-LOCATION-policy'
e4e5b28 cmTarget: Deprecate the LOCATION target property with a policy.
2013-10-15 09:33:05 -04:00
Brad King 34f66ae21b Merge topic 'deprecate-COMPILE_FLAGS'
3507d5a Deprecate COMPILE_FLAGS target property.
2013-10-15 09:32:48 -04:00
Brad King 06491955eb Merge topic 'export-at-generate-time'
a4263c9 export(): Handle multiple dependent export sets.
66b290e export(): Process the export() command at generate time.
5fe5c32 export(): Set a Makefile on the cmExportBuildFileGenerator.
e383555 cmExportInstallFileGenerator: Fix comment to match reality.
2013-10-15 09:32:36 -04:00
Brad King ebffbda447 Merge topic 'fix-CMP0024-multiple-directories'
af1f698 CMP0024: Store the fact of included export in global generator.
2013-10-15 09:32:32 -04:00
Brad King 08dc9720ef Merge topic 'osx-framework-search-flag'
2e13c36 OS X: Encode -F framework search flag in per-language platform variable
2013-10-15 09:32:03 -04:00
Kitware Robot bedb7bc526 CMake Nightly Date Stamp 2013-10-15 00:01:08 -04:00
Роман Донченко eec7834ed8 list: Fix docs for APPEND to show that elements are optional
list(APPEND) has been able to append nothing since commit a06dcdba
(Allow LIST(APPEND) command to append nothing, 2008-01-16) but the
documentation still used to imply that at least one argument is
required.
2013-10-14 11:16:59 -04:00
Kitware Robot d37c934f17 CMake Nightly Date Stamp 2013-10-14 00:01:05 -04:00
Nils Gladitz 2e6cadde13 CPackWiX: allow user supplied extra sources, objects and libraries 2013-10-13 13:16:54 +02:00
Kitware Robot de94782bc5 CMake Nightly Date Stamp 2013-10-13 00:01:06 -04:00
Nils Gladitz 3a4a74828c CPackWiX: generate deterministic ids for directories, components and files 2013-10-12 10:41:05 +02:00
Kitware Robot dca43862f1 CMake Nightly Date Stamp 2013-10-12 00:01:07 -04:00
Stephen Kelly e4e5b28c27 cmTarget: Deprecate the LOCATION target property with a policy.
The final location and name of a build-target is not determined
until generate-time. However, reading the LOCATION property from
a target is currently allowed at configure time. Apart from creating
possibly-erroneous results, this has an impact on the implementation
of cmake itself, and prevents some major cleanups from being made.

Disallow reading LOCATION from build-targets with a policy. Port some
existing uses of it in CMake itself to use the TARGET_FILE generator
expression.
2013-10-11 21:17:27 +02:00
Stephen Kelly 3507d5afdd Deprecate COMPILE_FLAGS target property.
It is succeeded by COMPILE_OPTIONS, which supports generator
expressions, is a list rather than a string, and is properly
escaped.
2013-10-11 13:40:29 +02:00
Stephen Kelly a4263c9f64 export(): Handle multiple dependent export sets.
The export-sets topic, merged in commit 49c7b649 (Merge topic
'export-sets', 2012-10-01) changed install(EXPORT) to allow
exporting targets whose dependents are exported separately
to different locations. Doing the same for export() was not
possible because the export() command was executed at
configure-time.

Now that export() is also executed at generate-time, make it
possible to export to multiple dependent export sets.
2013-10-11 12:46:10 +02:00
Stephen Kelly 66b290e7e2 export(): Process the export() command at generate time.
Make the API for adding targets string based so that it can easily
use cmGeneratorTarget.

Teach the cmIncludeCommand to generate the exported file at
configure-time instead if it is to be include()d.

The RunCMake.ExportWithoutLanguage test now needs a dummy header.h
file as expected error from export() is now reported after the
missing file error.
2013-10-11 12:46:10 +02:00
Kitware Robot 2a96e374fc CMake Nightly Date Stamp 2013-10-11 00:01:06 -04:00
Stephen Kelly 5fe5c32480 export(): Set a Makefile on the cmExportBuildFileGenerator.
This is better than the cmCommand, because the lifetime of that is
not as useful, and it is only used to report an error anyway.

In the next commit, the cmExportBuildFileGenerator will outlive the
cmCommand.
2013-10-10 16:36:26 +02:00
Brad King 2e13c36211 OS X: Encode -F framework search flag in per-language platform variable
Compilers for languages other than C and C++ on OS X may not understand
the -F framework search flag.  Create a new platform information
variable CMAKE_<LANG>_FRAMEWORK_SEARCH_FLAG to hold the flag, and set it
for C and CXX lanugages in the Platform/Darwin module.

Reported-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2013-10-10 08:33:25 -04:00
Stephen Kelly e383555838 cmExportInstallFileGenerator: Fix comment to match reality.
It was copied from cmExportBuildFileGenerator.
2013-10-10 12:02:32 +02:00
Stephen Kelly af1f698757 CMP0024: Store the fact of included export in global generator.
Storing it in the makefile means that the policy does not trigger
when include and export are in differing directories.
2013-10-10 12:01:39 +02:00
Kitware Robot 872db622d6 CMake Nightly Date Stamp 2013-10-10 00:01:11 -04:00
Brad King 5925e34107 Merge topic 'osx-cmake-app-info-plist'
dcf1b64 OS X: Set CMake.app bundle Info.plist fields (#11694)
2013-10-09 10:24:34 -04:00
Brad King be9d289fce Merge topic 'deprecation-message'
f973737 GenerateExportHeader: Port to use message(DEPRECATION)
f69606d Qt4Macros: Port to use message(DEPRECATION)
509c142 message: Add a DEPRECATION mode
2013-10-09 10:24:16 -04:00
Brad King e81b6742f7 Merge topic 'haiku-updates'
54ef2be Haiku: Include files cleanup in cmCTest
38d5555 Haiku: Remove outdated preprocessor checks
1dc61f8 Haiku: Remove use of B_COMMON_DIRECTORY
7ebc1cb Haiku: Several fixes to platform module
2013-10-09 10:23:04 -04:00
Brad King 7ed7d75a04 Merge topic 'update-kwsys'
f59693b Merge branch 'upstream-kwsys' into update-kwsys
1a39f85 KWSys 2013-10-08 (96b2f6f4)
2013-10-09 10:22:37 -04:00
Brad King 8424d569f0 Merge topic 'unset-PARENT_SCOPE'
261c248 unset: Add PARENT_SCOPE option
2013-10-09 10:22:10 -04:00
Brad King 12a7e2b10c Merge topic 'apple-clang-id'
1763c31 Set policy CMP0025 to NEW while building CMake itself
aa53ee5 Add policy CMP0025 for Apple Clang compiler id compatibility
ab65862 Clang: Add separate "AppleClang" compiler id
2013-10-09 10:21:28 -04:00
Kitware Robot 7f268c243f CMake Nightly Date Stamp 2013-10-09 00:01:16 -04:00
Brad King dcf1b64569 OS X: Set CMake.app bundle Info.plist fields (#11694)
Use the Apple Info.plist reference documentation:

 Core Foundation Keys
 https://developer.apple.com/library/mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html

 Launch Services Keys
 https://developer.apple.com/library/mac/documentation/general/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html

 Cocoa Keys
 https://developer.apple.com/library/mac/documentation/general/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html

modify the Info.plist we create for cmake-gui to add/set fields

 CFBundleShortVersionString = The release-version-number string
 LSApplicationCategoryType  = UTI that categorizes the app for the App Store
 NSHumanReadableCopyright   = Specifies the copyright notice

and drop fields

 CFBundleGetInfoString
 CFBundleLongVersionString
 LSRequiresCarbon

Also prepare to set

 CFBundleVersion            = The build-version-number string

but leave it commented out as TBD (To Be Determined) for now.

The version fields must have form <major>.<minor>.<patch> with integer
components.  While at it, rename the bundle to end in ".<patch>" instead
of "-<patch>" so that it is consistent with the version number and does
not look like a packaging increment suffix.
2013-10-08 12:32:28 -04:00
Stephen Kelly 509c142a3f message: Add a DEPRECATION mode
By default, the message is not issued. If CMAKE_ERROR_DEPRECATED
is on, the message is fatal. If CMAKE_WARN_DEPRECATED is on, the
message is a warning.
2013-10-08 18:11:22 +02:00
Brad King 40c84683aa Merge topic 'export-policy'
904ff9f export: Add policy CMP0024 to disallow include() of export files
2013-10-08 10:59:07 -04:00
Brad King 5a6c15155c Merge topic 'clang-cl-compiler'
3d8356d Clang: Support Windows variants for GNU and MSVC (#13035, #14458)
51ab85c CMakeDetermineCompilerId: Add notion of "simulated" id/version
be10826 CMakeDetermineCompilerId: Fix local var init
2013-10-08 10:58:56 -04:00
Brad King f8241136b4 Merge topic 'INTERFACE_LIBRARY-target-type'
ce0c303 install: Teach EXPORT option to handle INTERFACE_LIBRARY targets
435c912 export: Add support for INTERFACE_LIBRARY targets
fe73226 Add the INTERFACE_LIBRARY target type.
2013-10-08 10:58:40 -04:00