Commit Graph

287 Commits

Author SHA1 Message Date
Brad King d51c1f090a Help: Fix xref typos in target_compile_options docs
Fix links to the COMPILE_OPTIONS directory and target properties.
2015-03-31 08:51:05 -04:00
Brad King ac14cbf017 Allow add_dependencies() on INTERFACE libraries (#15414)
Revert commit v3.0.0-rc1~175^2~20 (add_dependencies: Disallow use with
INTERFACE_LIBRARY, 2013-12-25).  Teach our dependency analysis to
transitively follow INTERFACE target utility dependencies as was done or
IMPORTED targets in commit v2.8.6~127^2~1 (Allow add_dependencies() on
imported targets, 2010-11-19).  Extend the InterfaceLibrary test with a
case to cover header generation for a header-only INTERFACE library via
a custom target.
2015-03-27 16:25:09 -04:00
Brad King 817d31db97 Help: Format add_dependencies documentation
Add reStructuredText markup.
2015-03-27 16:24:19 -04:00
Domen Vrankar a2c068a7ce file: Teach GLOB to list directories optionally
GLOB lists directories by default and GLOB_RECURSE does not.
LIST_DIRECTORIES enables user to control the behavior explicitly for
consistently for both GLOB and GLOB_RECURSE.
2015-03-20 09:45:25 -04:00
Daniele E. Domenichelli 4efef3f775 Help: Clarify that ARGV# beyond ARGC will have an undefined behavior (#15380) 2015-02-26 17:42:30 +01:00
Daniele E. Domenichelli e3363bfbec Help: Refine the .rst formatting of macro and function documentation 2015-02-26 17:19:52 +01:00
Brad King 206ce77781 Merge topic 'ctest-output-options'
ff1ddd2a ctest_upload: Add QUIET option
0b87b2a3 ctest_memcheck: Add QUIET option
fc58bdb9 ctest_coverage: Add QUIET option
876a680d ctest_test: Add QUIET option
49ba4545 ctest_build: Add QUIET option
f999dc0b ctest_configure: Add QUIET option
645ad117 ctest_update: Add QUIET option
19d1a559 ctest_start: Add QUIET option
1643b905 ctest_submit: Add QUIET option
12db1139 CTest: Add cmCTestOptionalLog macro
2015-02-24 09:12:33 -05:00
Zack Galbreath ff1ddd2a73 ctest_upload: Add QUIET option 2015-02-23 10:02:00 -05:00
Zack Galbreath 0b87b2a339 ctest_memcheck: Add QUIET option 2015-02-23 10:02:00 -05:00
Zack Galbreath fc58bdb9ad ctest_coverage: Add QUIET option 2015-02-23 10:02:00 -05:00
Zack Galbreath 876a680d48 ctest_test: Add QUIET option 2015-02-23 10:01:59 -05:00
Zack Galbreath 49ba4545c2 ctest_build: Add QUIET option 2015-02-23 10:01:59 -05:00
Zack Galbreath f999dc0bbf ctest_configure: Add QUIET option 2015-02-23 10:01:59 -05:00
Zack Galbreath 645ad117e1 ctest_update: Add QUIET option 2015-02-23 10:01:59 -05:00
Zack Galbreath 19d1a5599a ctest_start: Add QUIET option
This suppresses all non-error messages that would have otherwise
been printed by this function.
2015-02-23 10:01:59 -05:00
Zack Galbreath 1643b905e0 ctest_submit: Add QUIET option
Specifying this option prevents CTest from printing any non-error
messages to the console for this call to ctest_submit().
2015-02-23 10:01:58 -05:00
Brad King c4c570f9cc Merge topic 'find-command-prefix-from-PATH'
ffc06c12 Teach find_(library|file|path) to get prefixes from PATH (#15370)
2015-02-20 08:10:50 -05:00
Brad King ffc06c1239 Teach find_(library|file|path) to get prefixes from PATH (#15370)
The find_package command already knows how to compute installation
prefixes from PATH.  Use the same approach to establish prefixes for
find_library, find_file, and find_path to use to look in directories
like "<prefix>/lib[/<arch>]" and "<prefix>/include" for libraries and
headers.  This will reduce the amount of configuration end users need to
do to establish a work environment rooted under a specific prefix.
2015-02-19 10:03:17 -05:00
Stephen Kelly 1ee4721f7c Help: Fix formatting of command parameter. 2015-02-17 19:18:11 +01:00
Brad King 0304e54528 Merge topic 'doc-configure_file-output-location'
029d38fa Help: Revise configure_file documentation (#15403)
2015-02-13 11:03:03 -05:00
Brad King 029d38fa61 Help: Revise configure_file documentation (#15403)
Format the documentation with better reST markup.  Revise the
wording to clarify how relative paths are handled.  Also add
an example section.
2015-02-12 16:20:32 -05:00
Brad King f30022eb07 install: Allow generator expressions in TARGETS DESTINATION (#14317)
This will allow per-config destinations for targets in EXPORT sets.
Using multiple install(TARGETS) with separate CONFIGURATIONS is
rejected as a target appearing more than once in an export set.
Now instead one can write

 install(TARGETS foo EXPORT exp DESTINATION lib/$<CONFIG>)

to get a single logical membership of the target in the export set
while still having a per-config destination.
2015-02-11 15:15:33 -05:00
Stephen Kelly 6da65b3907 Allow export of targets with INTERFACE_SOURCES.
Use the same rules for paths in source and binary dirs in
installed INTERFACE_SOURCES as are used for
INTERFACE_INCLUDE_DIRECTORIES.
2015-02-11 00:51:34 +01:00
Brad King 02d031827d Merge topic 'update-docs'
f9839c49 Help: Document build targets automatically added to console pool.
44d6f3ce Help: Add some cross-linking.
2015-02-05 09:25:16 -05:00
Brad King 219797e4be Help: Revise try_compile and try_run documentation (#15358)
Rewrite the documentation using better reStructuredText markup
constructs.  Clarify interaction of options like LINK_LIBRARIES and
CMAKE_FLAGS.
2015-02-04 16:06:13 -05:00
Stephen Kelly 44d6f3ce08 Help: Add some cross-linking. 2015-02-04 21:52:00 +01:00
Brad King a47b904db2 Merge topic 'file-strings-utf-16'
1f77a700 file: Teach STRINGS to support UTF-16 and UTF-32 encodings
2015-01-27 11:36:45 -05:00
Justin Borodinsky 1f77a7001b file: Teach STRINGS to support UTF-16 and UTF-32 encodings 2015-01-27 11:30:26 -05:00
Brad King 095fc28a7e Merge topic 'doc-link_libraries-note'
c7310917 Help: Clarify status of link_libraries command
2015-01-27 11:21:55 -05:00
Brad King 8def82585c Merge topic 'try-run-link-libraries'
d0adcccb try_run: Add tests for LINK_LIBRARIES with mock libraries.
223c5cb7 try_run: Add test for bad link libraries.
e2b1f058 try_run: Add support for LINK_LIBRARIES option.
2015-01-26 10:28:25 -05:00
Matt McCormick e2b1f0583f try_run: Add support for LINK_LIBRARIES option.
Most functionality is already implemented in Source/cmCoreTryCompile.{h,cxx}.
Document and improve argument parsing.

This functionality is already being used by a number of modules, like
CheckCSourceCompiles.cmake, but it is not documented.
2015-01-26 10:05:26 -05:00
Brad King c7310917e6 Help: Clarify status of link_libraries command
The command has been documented as 'deprecated', but it is not really
slated for removal and can still be used.  Clarify this in the
documentation.  While at it, revise the documentation to use wording
more consistent with that now in target_link_libraries.

Suggested-by: Christoph Grüninger <foss@grueninger.de>
2015-01-26 09:15:00 -05:00
Brad King 6dd980e0ef ctest_submit: Make CDASH_UPLOAD mode arguments more strict
Disallow mixing of arguments from different command signatures.
Extend the RunCMake.CTestSubmit test to cover such error cases.
2015-01-20 09:33:21 -05:00
Bill Hoffman 5dc33f89b5 ctest_submit: Add CDASH_UPLOAD mode to upload files to CDash
This adds support for the new cdash API where arbitrary files can be
uploaded to the CDash server.  This CDash API communicates via json
files so the json parser jsoncpp was added to the Utilities directory.
2015-01-20 09:33:21 -05:00
Brad King f3ad57d25e Merge branch 'doc-CMAKE_FIND_PACKAGE_NAME' into release 2015-01-12 09:01:10 -05:00
Brad King c9f3e829e7 Merge topic 'doc-CMAKE_FIND_PACKAGE_NAME'
8435088d Help: Document CMAKE_FIND_PACKAGE_NAME variable
b8abd258 find_package: Document CMAKE_FIND_PACKAGE_NAME variable
2015-01-12 08:57:45 -05:00
Gregor Jasny b8abd25897 find_package: Document CMAKE_FIND_PACKAGE_NAME variable
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-01-11 15:16:48 -05:00
Brad King cb5fc7b993 Merge topic 'fix-empty-target-property-queries'
c6d03a10 tests: add tests for querying properties
76ff92e0 set_tests_properties: fix documentation
28214862 get_test_property: clarify the documentation
34a99094 get_target_property: discern empty from undefined properties (#15333)
2015-01-11 12:00:20 -05:00
Brad King ca5fe169aa Merge branch 'fix-empty-target-property-queries' into release 2015-01-11 11:50:14 -05:00
Ben Boeckel 76ff92e0c9 set_tests_properties: fix documentation
The error is raised if the *test* doesn't exist, not the property.
2015-01-11 11:45:43 -05:00
Ben Boeckel 282148628f get_test_property: clarify the documentation
If either the test or the property doesn't exist, NOTFOUND will be used.
No error is raised in either case.
2015-01-11 11:45:43 -05:00
Brad King 427d932498 Merge topic 'doc-if-variable-not-defined'
7a2c3f0c Help: Clarify if(<variable>) documentation (#15335)
2015-01-10 12:14:56 -05:00
Brad King 7a2c3f0c0e Help: Clarify if(<variable>) documentation (#15335)
When the variable is not defined the signature is actually accepting
a string.  Also clarify fall-through from if(<constant>) case.
2015-01-08 13:43:40 -05:00
Brad King 953d34fd1f Help: Document MAIN_DEPENDENCY limitation in add_custom_command
Specify explicitly that at most one custom command may use a given
source file as its main dependency.
2014-12-16 10:38:43 -05:00
Brad King 9859042c05 Help: Mention add_dependencies in add_custom_target DEPENDS option
This will direct readers looking to add target-level dependencies.
2014-12-16 10:38:10 -05:00
Brad King 03db9a061a Merge topic 'doc-file-GENERATE-order'
fe21580b Help: Document file(GENERATE) signature option order
2014-12-05 14:01:04 -05:00
Brad King eff4081bfb Merge branch 'doc-file-GENERATE-order' into release 2014-12-05 13:32:46 -05:00
Brad King fe21580b84 Help: Document file(GENERATE) signature option order
In commit v3.1.0-rc1~484^2 (Help: Format and revise file() command
documentation, 2014-05-23) the signature of file(GENERATE) was
accidentally simplified too much and dropped specification of the
required argument ordering.  Restore the signature to make the order
clear.
2014-12-05 13:28:24 -05:00
Brad King d90e288b7b Merge topic 'file-LOCK-command'
93017828 Help: Add notes for topic 'file-LOCK-command'
e6db4c5a file: Add LOCK subcommand to do file and directory locking
05d6531c cmSystemTools: Add StringToInt helper
2014-12-03 10:02:07 -05:00
Ruslan Baratov e6db4c5a4e file: Add LOCK subcommand to do file and directory locking
Provide options to fail without blocking or to block up to a timeout.
Provide options to specify the scope containing the lock so it can be
released automatically at the end of a function, file, or process.

Extend the RunCMake.file test with cases covering the file(LOCK) command
usage and error cases.
2014-12-03 09:47:44 -05:00
Gregor Jasny 0de867dde2 continue: Add a new CMake language command for loop continuation (#14013)
Inspired-by: Doug Barbieri
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-12-01 09:50:49 -05:00
Brad King 8e75f1d2fa Merge topic 'target-sources-error-conditions'
8a75c7ef Help: Document the export limitation of INTERFACE_SOURCES.
e1348056 Export: Disallow export of targets with INTERFACE_SOURCES
bb5905bb cmTarget: Don't allow relative paths in INTERFACE_SOURCES
2014-12-01 08:57:34 -05:00
Brad King 2a92231630 Merge topic 'doc-installed-file-property'
89bb34d3 Help: Add 3.1 release notes for INSTALL property scope
07254a81 Help: Document installed file property API
a1aceb25 Help: Format set_property and get_property command docs
2014-12-01 08:57:32 -05:00
Brad King 58d3898083 Merge branch 'target-sources-error-conditions' into release 2014-12-01 08:55:45 -05:00
Brad King 5445a99d1a Merge branch 'doc-installed-file-property' into release 2014-12-01 08:49:13 -05:00
Nils Gladitz 07254a8166 Help: Document installed file property API
Since commit v3.1.0-rc1~479^2~1 (Add an "installed file" property
scope, 2014-05-15) the get_property and set_property commands
support an 'INSTALL' scope.  Add documentation for this scope.
2014-12-01 08:48:19 -05:00
Brad King a1aceb2585 Help: Format set_property and get_property command docs 2014-12-01 08:47:58 -05:00
Stephen Kelly 8a75c7ef32 Help: Document the export limitation of INTERFACE_SOURCES. 2014-11-29 12:25:00 +01:00
Brad King 90cfed51f6 Merge topic 'improve-INTERFACE-property-docs'
bb1111ea Help: Warn that paths should not be used in INTERFACE_ build properties.
96691d12 Help: Fix typo in genex in documentation.
f8f02451 Help: Use a property-specific command instead of the generic one.
8609a884 Help: Make remaining build property docs consistent.
bcface39 Help: Link to target_link_libraries from target properies.
e12926e7 Help: Format the LINK_INTERFACE_LIBRARIES target properies.
c8540e94 Help: Unify the help text of INTERFACE_ build properties.
2014-11-25 10:18:52 -05:00
Brad King 0f19208076 Merge topic 'custom-command-byproducts'
557aef0b ExternalProject: Add options to specify BYPRODUCTS (#14963)
e15a7075 Add an option for explicit BYPRODUCTS of custom commands (#14963)
2014-11-25 10:18:16 -05:00
Stephen Kelly bb1111eaa2 Help: Warn that paths should not be used in INTERFACE_ build properties. 2014-11-25 10:00:35 -05:00
Brad King d4fdfaaef1 Merge branch 'doc-target_include_directories-fixup' into release 2014-11-17 15:16:35 -05:00
Brad King d903f7ce91 Merge topic 'doc-target_include_directories-fixup'
1d22ee67 Help: target_include_directories does not allow target names
2014-11-17 15:15:56 -05:00
Brad King 1d22ee67aa Help: target_include_directories does not allow target names
Since commit v2.8.11~227^2~1 (Don't allow targets args in the new target
commands, 2013-01-29) the target_include_directories command does not
support target names on the right hand side, but that commit forgot to
remove it from the docs.  It was never released with such support.
Update the command documentation now.
2014-11-17 14:47:42 -05:00
Brad King 444f61e044 Merge topic 'console-pool'
2d75d7e5 Help: Add notes for topic 'console-pool'
f42d86f0 Ninja: Implement USES_TERMINAL using the console pool if available
f281ae01 Ninja: Remove unused declaration
d5eae556 Ninja: factor out the test for console pool support
4d1fedf4 Give the interactive cache editor the USES_TERMINAL property
fe5d6e8c Add USES_TERMINAL option for custom commands
ad6ee426 Rename doing_verbatim to doing_nothing
2014-11-17 09:40:56 -05:00
Brad King 545d10cc67 Merge topic 'string-SUBSTRING-truncate'
474bbb9d string: Tolerate SUBSTRING length exceeding end index
2014-11-17 09:40:44 -05:00
Brad King e15a7075b5 Add an option for explicit BYPRODUCTS of custom commands (#14963)
A common idiom in CMake-based build systems is to have custom commands
that generate files not listed explicitly as outputs so that these
files do not have to be newer than the inputs.  The file modification
times of such "byproducts" are updated only when their content changes.
Then other build rules can depend on the byproducts explicitly so that
their dependents rebuild when the content of the original byproducts
really does change.

This "undeclared byproduct" approach is necessary for Makefile, VS, and
Xcode build tools because if a byproduct were listed as an output of a
rule then the rule would always rerun when the input is newer than the
byproduct but the byproduct may never be updated.

Ninja solves this problem by offering a 'restat' feature to check
whether an output was really modified after running a rule and tracking
the fact that it is up to date separately from its timestamp.  However,
Ninja also stats all dependencies up front and will only restat files
that are listed as outputs of rules with the 'restat' option enabled.
Therefore an undeclared byproduct that does not exist at the start of
the build will be considered missing and the build will fail even if
other dependencies would cause the byproduct to be available before its
dependents build.

CMake works around this limitation by adding 'phony' build rules for
custom command dependencies in the build tree that do not have any
explicit specification of what produces them.  This is not optimal
because it prevents Ninja from reporting an error when an input to a
rule really is missing.  A better approach is to allow projects to
explicitly specify the byproducts of their custom commands so that no
phony rules are needed for them.  In order to work with the non-Ninja
generators, the byproducts must be known separately from the outputs.

Add a new "BYPRODUCTS" option to the add_custom_command and
add_custom_target commands to specify byproducts explicitly.  Teach the
Ninja generator to specify byproducts as outputs of the custom commands.
In the case of POST_BUILD, PRE_LINK, and PRE_BUILD events on targets
that link, the byproducts must be specified as outputs of the link rule
that runs the commands.  Activate 'restat' for such rules so that Ninja
knows it needs to check the byproducts, but not for link rules that have
no byproducts.
2014-11-14 16:16:00 -05:00
Peter Collingbourne fe5d6e8c0f Add USES_TERMINAL option for custom commands
Teach the add_custom_command and add_custom_target commands a new
USES_TERMINAL option.  Use it to tell the generator to give the command
direct access to the terminal if possible.
2014-11-14 11:55:09 -05:00
Brad King 0cacf73959 Help: Document add_custom_command marking outputs GENERATED 2014-11-14 10:06:55 -05:00
Brad King 66ea634b4c Help: Revise and format 'add_custom_target' docs
Format the reStructuredText markup manually.  Organize the command
options into a definition list.  Use inline markup to cross-reference
related documents.
2014-11-13 11:52:54 -05:00
Domen Vrankar 474bbb9dbc string: Tolerate SUBSTRING length exceeding end index
string SUBSTRING command now ignores length if it points
past end of string and uses end of string instead.
String SUBSTRING tests now cover more corner cases.
2014-11-13 11:04:52 -05:00
Brad King 3d0addd965 Merge branch 'doc-install-SCRIPT-CODE-COMPONENT' into release 2014-11-13 10:21:53 -05:00
Brad King 8abba92472 Merge topic 'doc-install-SCRIPT-CODE-COMPONENT'
7361e810 Help: Document COMPONENT option of install(SCRIPT/CODE) (#14956)
2014-11-13 10:08:25 -05:00
Brad King 7361e8102a Help: Document COMPONENT option of install(SCRIPT/CODE) (#14956) 2014-11-13 08:41:56 -05:00
Brad King 4c8c442d7c Help: Fix broken cross-references reported by 'nitpicky' option
Enable the Sphinx 'nitpicky' option and fix the resulting warnings about
dangling references.
2014-11-07 11:41:21 -05:00
Brad King b71399a189 Merge branch 'release-doc-formatting' into release 2014-11-07 10:20:58 -05:00
Brad King f84ddd4b56 Help: Format add_library documented list of INTERFACE commands
Use a bullet list to make it easier to read.
2014-11-06 14:46:18 -05:00
Brad King aa0f6e8309 Merge branch 'doc-add_library-typo' into release 2014-10-31 11:38:36 -04:00
Nils Gladitz 38825396f9 Documentation: Fix minor typo thecommand -> the command 2014-10-31 11:27:50 -04:00
Brad King 8f01867340 Merge branch 'doc-add_compile_options' into release 2014-10-29 15:24:03 -04:00
Brad King 352cbb6e36 Help: Reference add_compile_options from add_definitions (#15225)
When we explain in add_definitions documentation that it is intended
only for preprocessor definitions, link to add_compile_options for
adding other flags.  Also explicitly mention that the order of
add_definitions calls with respect to target creation does not matter.
This differs from the behavior now explicitly stated in the
documentation of add_compile_options.
2014-10-29 15:23:31 -04:00
Brad King a9f8c50aa2 Help: Clarify add_compile_options documentation (#15225)
Explain that it affects only targets added after the call.  Fix the link
to the COMPILE_OPTIONS directory propert documentation.  Update the
latter to explain that it is used to initialize the corresponding target
property when a target is created.
2014-10-29 09:18:56 -04:00
Brad King 35ca4863aa Help: Wrap long ctest_submit signature line 2014-10-22 16:41:07 -04:00
Brad King 0f2defba7d Merge topic 'doc-set_test_properties-example'
d8054987 Help: Fix set_tests_properties documentation typo
2014-09-15 10:27:41 -04:00
Brad King 9edf6903e6 Merge topic 'if-sanity'
858d5a0b Fix if() checks of CMAKE_SYSTEM_NAME on Cygwin
e177e7af FPHSA: Avoid if() dereferencing of quoted variable
425acc52 cmcurl: Use if(DEFINED) to simplify conditions
cede5cbd libarchive: Avoid depending on if() to dereference a quoted variable
2d97178b FindGTK2: Avoid depending on if() to dereference a quoted variable
0b12815d Modules/Test*.cmake: Use if(DEFINED) to simplify conditions
188a1f23 If: Introduce policy CMP0054 - don't dereference quoted variables in if()
b900c1cc If: Extract cmConditionEvaluator from if() implementation
2014-09-15 10:27:36 -04:00
Andrew Bauer d805498701 Help: Fix set_tests_properties documentation typo
The example for FAIL_REGULAR_EXPRESSION should actually name it.
2014-09-12 11:32:50 -04:00
Nils Gladitz 188a1f236e If: Introduce policy CMP0054 - don't dereference quoted variables in if() 2014-09-11 21:23:17 +02:00
Brad King 3d290c111a Merge topic 'string-uuid-doc-fix'
e6ba52e8 StringUuid: Mark UPPER flag optional in sub-command synopsis
2014-09-10 11:23:15 -04:00
Nils Gladitz e6ba52e8e0 StringUuid: Mark UPPER flag optional in sub-command synopsis 2014-09-10 16:10:13 +02:00
Brad King a5c6ae69f3 Merge topic 'doc-add_custom_command-multiple-commands'
1fdf4ff0 Help: Suggest in add_custom_command how to create a script (#15112)
2014-09-09 11:23:32 -04:00
Brad King 1fdf4ff06a Help: Suggest in add_custom_command how to create a script (#15112) 2014-09-08 14:17:36 -04:00
Brad King ecf43f0dc7 Merge topic 'doc-add_custom_command-multiple-commands'
412926d0 Help: Clarify add_custom_command multiple command behavior (#15112)
2014-09-04 09:48:32 -04:00
Alan W. Irwin abbe91c58c Help: Clarify --debug-trycompile usage with try_compile
Explain that try_compile calls need to be protected with conditions to
avoid running more than once so that it is easy to isolate a single
try_compile to perform with --debug-trycompile.
2014-09-03 11:19:52 -04:00
Brad King 412926d03a Help: Clarify add_custom_command multiple command behavior (#15112)
Explicitly say that the commands are not composed into a stateful
script.
2014-09-02 15:13:50 -04:00
Nils Gladitz 328e869433 StringUuid: Implement new string(UUID) sub-command. 2014-08-28 15:13:54 +02:00
Brad King a16a344b4b Merge topic 'doc-add_custom_command'
5bf1c5cc Help: Document add_custom_command PRE_BUILD/PRE_LINK for exe/lib only (#15059)
2a58c872 Help: Revise and format 'add_custom_command' docs
cb88742d Help: Remove stray content from 'add_custom_command' docs
2014-08-06 09:26:32 -04:00
Clinton Stimpson 5b30ec28f9 file: Add ENCODING option to file(STRINGS) command (#10519)
Support extraction of UTF-8 strings.
2014-08-06 09:23:47 -04:00
Brad King 5bf1c5cce1 Help: Document add_custom_command PRE_BUILD/PRE_LINK for exe/lib only (#15059)
State explicitly that the PRE_LINK mode is not for targets created by
the add_custom_target command.  The existing wording for PRE_BUILD being
treated as PRE_LINK by non-VS generators will now imply this restriction
for PRE_BUILD too.
2014-08-05 10:14:35 -04:00
Brad King 2a58c872d7 Help: Revise and format 'add_custom_command' docs
Format the reStructuredText markup manually.  Organize the command
options into a definition list.  Use inline markup to cross-reference
related documents.
2014-08-05 10:12:59 -04:00
Brad King cb88742da4 Help: Remove stray content from 'add_custom_command' docs
Remove leftover generator expression documentation that is now in
the cmake-generator-expressions(7) manual.
2014-08-05 09:59:10 -04:00
Brad King 8c03f15776 Help: Clarify target_link_libraries treatment of flags (#15034)
Explain that link flags should not be used in transitive contexts.
2014-07-28 12:45:06 -04:00
Brad King 2c470b775a add_library: Allow arbitrary non-linked sources in OBJECT libraries
Loosen this restriction on OBJECT libraries to allow source files of any
name to be generated by custom commands or listed for reference in IDE
projects so long as they would not affect linking of a normal library.
Update the rejection message to be more specific about the looser
restriction.

Extend the ObjectLibrary test to cover a ".cmake" file generated by a
custom command in an OBJECT library.
2014-07-09 09:43:42 -04:00
Brad King d19b64d671 install(DIRECTORY): Add MESSAGE_NEVER option to avoid output (#13761)
Installing large directories, e.g., the output of a doxygen run, prints
one line per file resulting in too much noise in the build output.  Add
an option to the install(DIRECTORY) command to not print anything upon
make install.

Extend the RunCMake.install test with cases covering MESSAGE_NEVER
behavior of the install(DIRECTORY) command.

Suggested-by: Stefan Eilemann <Stefan.Eilemann@epfl.ch>
2014-06-24 13:18:20 -04:00
Brad King c9568de52c install: Add CMAKE_INSTALL_MESSAGE variable (#13761)
Create a variable to allow users to control which installation
messages are printed.  In particular, provide a "LAZY" setting
that prints "Installing" messages but not "Up-to-date" messages.
This is desirable for incremental re-installations.

Suggested-by: J Decker <d3ck0r@gmail.com>
2014-06-24 13:18:20 -04:00
Brad King 67815894ca Help: Add install() command document section headers
Use section headers instead of horizontal dividers so that one may link
to the sections.
2014-06-24 12:52:11 -04:00
Brad King 20f5460288 Help: Link to Object Library docs from add_library 2014-06-12 13:59:13 -04:00
Brad King a81531817e Help: Organize add_library command documentation
Add a section for each library type signature.  Add a table of contents
at the top for the html builder.
2014-06-12 13:59:00 -04:00
Brad King 4054534cc6 Help: Mention INTERFACE_SOURCES as settable for INTERFACE libs
The add_library(INTERFACE) and Interface Libraries documentation
list all the INTERFACE_* properties and target_* commands that
can be used to define the interface.  Add INTERFACE_SOURCES
and target_sources() to these lists for completeness.
2014-06-12 13:31:01 -04:00
Stephen Kelly 7eef823e14 Help: Add comma to assist parsing of ctest_build command docs. 2014-06-05 11:58:49 +02:00
Stephen Kelly 5fb9b16d0c Help: Document that file(GENERATE) re-writes only when needed. 2014-06-05 11:58:02 +02:00
Brad King 34c6fd3ac0 Help: Convert CTest Script variable references to cross-references
In the ctest(1) manual and ctest_start() command documentation, convert
mentions of CTest Script variables to cross-references so they will be
rendered as links.
2014-06-03 14:34:13 -04:00
Brad King a38cc33824 Merge topic 'doc-include-dir-props'
907e422b Help: Explain build/install-tree include dirs in more places (#14946)
2014-06-03 09:03:51 -04:00
Brad King 4207b3a3bb Help: Use "^^^^" for subsubsection headers
This is the convention suggested in the Sphinx documentation and is
already used in several other places in the CMake documentation.
Update a few places where we were using other characters.
2014-06-02 14:00:33 -04:00
Brad King 907e422bc8 Help: Explain build/install-tree include dirs in more places (#14946)
Explain how to use $<BUILD_INTERFACE> and $<INSTALL_INTERFACE> directly
in the documentation of the target_include_directories command and
INTERFACE_INCLUDE_DIRECTORIES target property.  Otherwise readers need
to notice the link to the cmake-buildsystem(7) manual and find the
example in that to understand the need for these expressions.

Also fix the explanation in cmake-buildsystem(7) to not claim that
relative paths may be used inside a BUILD_INTERFACE expression.
2014-06-02 10:49:28 -04:00
Brad King 7b888a5624 Merge topic 'feature-extensions-by-default'
60a981ea Features: Enable compiler extensions by default.
2014-06-02 10:44:28 -04:00
Brad King 4b8ec7514a Merge topic 'doc-ctest-settings'
2d57a390 Help: Document ctest dashboard client usage
28f73dff Help: Document ctest_start initial checkout command variables
2014-06-02 10:44:26 -04:00
Stephen Kelly 60a981ea8e Features: Enable compiler extensions by default.
Compilers enable their extensions by default, and disabling them
implicitly can lead to results which are surprising or non-obvious
to debug.

 http://public.kitware.com/pipermail/cmake-developers/2014-May/010575.html
 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10214
 https://www.mail-archive.com/cmake-developers@cmake.org/msg10116.html
 (Compiler feature extensions by default, 29 May 2014)
2014-05-31 12:16:12 +02:00
Brad King b1f4e6206b Help: Reference cmake_minimum_required from cmake_policy docs
Note in a few places of the cmake_policy() command documentation
that the cmake_minimum_required() command can set policies too.

Inspired-by: Peter Kümmel <syntheticpp@gmx.net>
2014-05-30 15:20:24 -04:00
Brad King 69a23cb2a2 Help: Format cmake_policy command documentation
Add reStructuredText markup manually to improve formatting of the
documentation.  Organize the documentation into subsections.
2014-05-30 15:20:24 -04:00
Brad King 28f73dffbf Help: Document ctest_start initial checkout command variables
Describe the behavior of the ctest_start() command when the
CTEST_CHECKOUT_COMMAND or CTEST_CVS_CHECKOUT variable is set.
2014-05-30 14:15:55 -04:00
Brad King 41a0fde1c9 Merge topic 'doc-file-command'
d74ed543 Help: Format and revise file() command documentation
2014-05-27 09:46:41 -04:00
Brad King 07994577fc Merge topic 'doc-CTEST_BUILD_FLAGS'
b8d6ab60 Help: describe CTEST_BUILD_FLAGS
2014-05-27 09:46:39 -04:00
Stephen Kelly ca5d990f02 Help: Add a manual for compiler feature control.
Link to it from the documentation of related properties, variables
and commands.

Extend the cmake-developer(7) documentation with notes on
extending feature support for compilers.
2014-05-27 09:35:00 -04:00
Brad King d74ed5431a Help: Format and revise file() command documentation
Organize the documentation by sub-command to keep the signatures and
their descriptions nearby.  Use inline and explicit reST markup.  Revise
wording as necessary for the updated layout.  Clarify behavior of the
file(GENERATE) command w.r.t. conflicting file names.
2014-05-23 16:16:47 -04:00
Rolf Eike Beer b8d6ab6040 Help: describe CTEST_BUILD_FLAGS 2014-05-23 19:45:33 +02:00
Stephen Kelly 96eb97f89e Help: Fix whitespace in doc link. 2014-05-20 16:44:06 +02:00
Stephen Kelly e0890d03a4 Features: Extend concept to C language.
Add properties and variables corresponding to CXX equivalents.

Add features for c_function_prototypes (C90), c_restrict (C99),
c_variadic_macros (C99) and c_static_assert (C11). This feature
set can be extended later.

Add a <PREFIX>_RESTRICT symbol define to WriteCompilerDetectionHeader
to conditionally represent the c_restrict feature.
2014-05-15 00:15:18 +02:00
Daniele E. Domenichelli be8ae96098 Allow the Package Registry to be disabled (#14849)
When a project is packaged for redistribution the local package
registries should not be updated or consulted.  They are for developers.

Add variables to disable use of package registries globally:

* CMAKE_EXPORT_NO_PACKAGE_REGISTRY that disables the export(PACKAGE)
  command
* CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY that disables the User Package
  Registry in all the find_package calls.
* CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY that disables the
  System Package Registry in all the find_package calls.

Update documentation and unit tests.
2014-05-12 09:50:01 -04:00
Stephen Kelly 8ed59fc207 Add target_compile_features command.
This can be used to set the compiler features required by particular
targets. An error is issued at CMake time if the compiler does not
support the required feature. If a language dialect flag is required
by the features used, that will be added automatically.

Base the target_compile_features command on cmTargetPropCommandBase. This
gives us 'free' handling of IMPORTED, ALIAS, INTERFACE, non-compilable
and missing targets.
2014-04-07 18:11:18 +02:00
Stephen Kelly 9407174b1a target_sources: New command to add sources to target. 2014-04-02 23:14:02 +02:00
Stephen Kelly e5da9e51d0 cmTarget: Allow any generator expression in SOURCES property.
Remove use of UseObjectLibraries from Makefile and Ninja generators. It
is not needed now because those generators use GetExternalObjects
which already contains the objects from object libraries.

The VS10 generator calls both the UseObjectLibraries and the GetExternalObjects
methods. Ensure that duplicates are not created by skipping objects
from object libraries in handling of GetExternalObjects.

Similarly, fix VS6, VS7 and Xcode object handling by skipping
external objects from OBJECT_LIBRARY usage as appropriate.

The error message in the BadSourceExpression1 test is now reported
by the generator expression evaluator, so it has different text.
2014-04-02 23:12:56 +02:00
Stephen Kelly 28e1d2f8fc cmStringCommand: Add GENEX_STRIP subcommand.
Strip out any generator expressions in the input string.
2014-03-31 23:18:44 +02:00
Stephen Kelly bbffccca42 add_custom_command: Evaluate generator expressions in DEPENDS
Rely on evaluation in cmCustomCommandGenerator for the generators.

When tracing target dependencies, depend on the union of dependencies
for all configurations.
2014-03-20 09:21:56 -04:00
Brad King 955dd1a551 Merge topic 'doc-find_package-build-paths'
69d73d27 Help: Mention in find_package that cmake-gui step is Windows-only (#14781)
2014-03-05 11:07:57 -05:00
Brad King 54a4c93087 Merge branch 'doc-find_package-build-paths' into release 2014-03-03 14:43:36 -05:00
Brad King 69d73d27cb Help: Mention in find_package that cmake-gui step is Windows-only (#14781)
Recently used cmake-gui locations are searched only on Windows because
the Windows registry is used to record the values.  This behavior is
historical and may be removed by a policy in the future so rather than
implementing it on other platforms simply document the current behavior.
2014-03-03 14:36:48 -05:00
Brad King 8982a4b301 Merge topic 'add_definitions-no-genex'
1a9316a8 add_definitions: Don't document genex support.
2014-03-03 10:32:05 -05:00
Brad King 9efba5d956 Merge branch 'add_definitions-no-genex' into release 2014-03-03 10:12:01 -05:00
Stephen Kelly 1a9316a808 add_definitions: Don't document genex support.
This command does not support generator expressions. The documentation
was mistakenly extended to claim it in commit v3.0.0-rc1~60^2~3 (Help: Mark
up the buildsystem commands documentation, 2014-02-03).
2014-03-03 10:10:39 -05:00
Brad King cf42f93d07 Merge topic 'install-FILES-genex'
6e89c8a5 install: Support generator expressions in FILES and PROGRAMS mode
f11f7b34 cmInstallFilesGenerator: Add reference to calling cmMakefile
e190236c Help: Format install() command documentation
2014-02-24 10:40:04 -05:00
Brad King b686154b61 Merge branch 'install-FILES-genex' into release 2014-02-24 09:16:36 -05:00
Brad King 6e89c8a5f1 install: Support generator expressions in FILES and PROGRAMS mode
Teach the install(FILES) and install(PROGRAMS) commands to evaluate
generator expressions in the list of files.

Extend the ExportImport test to cover installation cases involving
generator expressions.
2014-02-21 17:05:26 -05:00
Brad King e190236c74 Help: Format install() command documentation
Add inline markup and explicit markup blocks as appropriate.
2014-02-21 17:05:26 -05:00
Brad King 8afa5fe8ce Help: Revise and format add_test() command documentation
Favor the add_test(NAME) signature and document the limitations of
the plain signature.
2014-02-20 08:58:13 -05:00
Brad King bf012e0cb6 Help: Format find_package() command documentation
Add inline markup and explicit markup block syntax as needed.
Add cross-references to other documentation as appropriate.
2014-02-17 15:37:04 -05:00
Stephen Kelly ba4c2fa8fd Help: Mark up the buildsystem commands documentation
Cross-link to the cmake-buildsystem manual.
2014-02-06 16:15:53 -05:00
Stephen Kelly 85a4fad78c Help: Use ``inline-literals`` to mark generator expressions. 2014-02-06 16:15:52 -05:00
Brad King 7e142c5ac2 project: Manage VERSION variables
Teach the project() command to set variables

  {PROJECT,<PROJECT-NAME>}_VERSION{,_MAJOR,_MINOR,_PATCH,_TWEAK}

holding the project version number and its components.  Add project()
command option "VERSION" to specify the version explicitly, and default
to the empty string when it is not given.

Since this clears variables when no VERSION is given, this may change
behavior for existing projects that set the version variables themselves
prior to calling project().  Add policy CMP0048 for compatibility.

Suggested-by: Alex Neundorf <neundorf@kde.org>
2014-01-29 09:45:18 -05:00
Brad King 16d040c958 project: Add optional LANGUAGES keyword
Teach the project() command to recognize an optional "LANGUAGES"
keyword after the project name and prior to the list of languages.
Do not allow multiple copies of the keyword.  If the keyword is
specified and no languages are listed, imply NONE.
2014-01-29 09:40:51 -05:00
Brad King 00007dcc36 Help: Format project command and variable documentation
Also add document for CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE variable.
2014-01-29 09:15:20 -05:00