Commit Graph

454 Commits

Author SHA1 Message Date
Patrick Stotko
c9349cc1b9 target_link_libraries: Allow use with targets in other directories
Previously the command did not allow naming targets on the LHS that
were not created in the calling directory.  Lift this restriction to
enable more flexible use by projects.

Fixes: #17943
2018-05-15 10:22:35 -04:00
Kyle Edwards
563781099f ctest_start: read model from TAG file
This change reworks ctest_start() so that simply calling
ctest_start(APPEND) will read all the information from the TAG file.
On top of that, it relaxes the argument parsing for ctest_start() to
allow greater flexibility in the argument ordering, and the documentation
for ctest_start() has been cleaned up.
2018-05-09 08:22:55 -04:00
Brad King
08b4ea639c Help: Organize file command docs into sections
Add a synopsis section at the top summarizing all signatures.

Issue: #17948
2018-05-07 10:10:37 -04:00
Brad King
51c0e1407c Help: Add Synopsis section to install, list, and string docs
Summarize the command signatures in one block at the top of the
documentation as is typical in Unix command-line tool manuals.
Make the mode keywords links to the corresponding full signature
and documentation.

Issue: #17948
2018-05-07 10:10:37 -04:00
Brad King
0acd705119 Help: Improve list command signature group name for read operations
The LENGTH, GET, JOIN, and SUBLIST operations all read the list without
modifying it.  Name their section appropriately.
2018-05-07 10:10:37 -04:00
Brad King
d5b2745b34 Help: Re-order file command docs
Prepare for the addition of section headers for grouping commands.
2018-05-07 10:10:37 -04:00
Craig Scott
7de29da7c4 Merge topic 'feature/cpack-default-package-version'
af1c48871c CPack: Use project version as default for `CPACK_PACKAGE_VERSION`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Harry Mallon <hjmallon@gmail.com>
Merge-request: !2020
2018-05-03 17:18:38 -04:00
Brad King
7c2866ec60 Merge topic 'namelink-component'
7e8046e20b Help: add release notes for NAMELINK_COMPONENT
c02eeb0853 Help: clarify "undefined behavior" in install(EXPORT) command
edcb545a24 install: add test for new NAMELINK_COMPONENT parameter
0212d7c762 install: add NAMELINK_COMPONENT argument
cbb609072f Help: clean up install(TARGETS) documentation
b81280ba1f Help: add list of command signatures to top of INSTALL page

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !1982
2018-05-03 08:11:20 -04:00
Kyle Edwards
c02eeb0853 Help: clarify "undefined behavior" in install(EXPORT) command
The "undefined behavior" that the install(EXPORT) command warned about
was simply the possibility of build errors (or other errors) if the
referenced targets aren't installed. As long as the referenced targets
are installed, this won't be an issue.
2018-05-03 08:08:42 -04:00
Kyle Edwards
0212d7c762 install: add NAMELINK_COMPONENT argument
For shared libraries, this allows you to specify separate components
for the shared library and for the namelink.

Suggested in https://cmake.org/pipermail/cmake-developers/2014-December/024032.html.
2018-05-03 08:08:37 -04:00
Alex Turbov
af1c48871c CPack: Use project version as default for CPACK_PACKAGE_VERSION
* Introduce `CMAKE_PROJECT_VERSION` and the corresponsing components:
  `CMAKE_PROJECT_VERSION_MAJOR`, `CMAKE_PROJECT_VERSION_MINOR`,
  `CMAKE_PROJECT_VERSION_PATCH` and `CMAKE_PROJECT_VERSION_TWEAK`.

* `CPack` module use `CMAKE_PROJECT_VERSION_MAJOR`,
  `CMAKE_PROJECT_VERSION_MINOR` and `CMAKE_PROJECT_VERSION_PATCH`
  to initialize corresponsing CPack variables.
2018-05-03 08:26:03 +10:00
Brad King
6dd11ffbde Help: Clarify add_custom_command build event execution order
Fixes: #17949
2018-05-02 13:19:00 -04:00
Kyle Edwards
cbb609072f Help: clean up install(TARGETS) documentation
The documentation for install(TARGETS) has been rearranged so that
the options are presented as a list, for better readability and
maintenance.
2018-04-30 09:14:44 -04:00
Kyle Edwards
b81280ba1f Help: add list of command signatures to top of INSTALL page 2018-04-30 09:14:35 -04:00
Brad King
b74a49d326 Merge topic 'doc-help-spelling'
20d90a9482 Help: Some spelling corrections for commands.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1994
2018-04-23 10:18:26 -04:00
Brad King
3d6bedb903 Merge topic 'cmake-install-doc'
a4f71b4ba8 Help: Document existence of cmake_install.cmake
fcf64866da Help: move DESTDIR into a separate page

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1979
2018-04-23 10:17:42 -04:00
Yee Fan
20d90a9482 Help: Some spelling corrections for commands. 2018-04-21 00:37:09 +08:00
Marc Chevrier
cb83314e65 add_compile_definitions: add new command
This command manages preprocessor definitions at directory level and
supports generator expressions.

Fixes: #15374
2018-04-20 09:28:13 -04:00
Kyle Edwards
a4f71b4ba8 Help: Document existence of cmake_install.cmake
This file, which is currently undocumented, is useful for external
packaging programs that wish to install only a single component at a
time. This change adds documentation for the file.
2018-04-20 08:39:52 -04:00
Rolf Eike Beer
fbf330ce2b typo: incerment -> increment 2018-04-17 18:52:01 +02:00
Marc Chevrier
dca2347980 list: Add TRANSFORM sub-command
Issue: #17823
2018-04-16 17:11:53 +02:00
Brad King
4a127b78fd Help: Fix install(EXPORT_ANDROID_MK) mode documentation
`install(EXPORT_ANDROID_MK)` is its own mode, not an option to the
normal `install(EXPORT)` mode.

While at it, also fix the prose in our documented example to match
the code.

Fixes: #17891
2018-04-09 11:32:10 -04:00
Brad King
d308e9442e Merge topic 'glob_configure_depends'
6c4f8b4596 Adjust help documentation for file(GLOB), add topic notes
20612978c8 Add tests for `file(GLOB)` CONFIGURE_DEPENDS flag
3f4b81f540 Add glob verify support to XCode, VS, Ninja, and Makefile generators
ca0befc2e1 Add `CONFIGURE_DEPENDS` flag support to cmFileCommand::HandleGlobCommand
599c93e22d Add cmGlobVerificationManager class, integrate with cmake and cmState

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1767
2018-04-06 10:25:08 -04:00
Brad King
eb80af9093 Drop Visual Studio 8 2005 generator
This generator has been deprecated since CMake 3.9.  Remove it.
2018-04-02 10:08:10 -04:00
Shane Parris
6c4f8b4596 Adjust help documentation for file(GLOB), add topic notes 2018-04-01 23:16:13 -04:00
Craig Scott
23922f48cc Merge topic 'pr.find_package.prefixes'
4eb5d851d5 Help: Add 'lib32|libx32|lib64' paths to find_package prefixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1878
2018-03-23 05:11:18 -04:00
Craig Scott
9f2ec9d241 Merge topic 'list-sublist'
768225837d list: Add SUBLIST sub-command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1874
2018-03-22 15:27:24 -04:00
Craig Scott
82df2fe17e Merge topic 'policy-version-range'
45408b5ea1 cmake_minimum_required: Optionally set policies with version range
6a41aa2abd cmPolicies: Split parsing and impl of ApplyPolicyVersion
1d00ed7cf7 cmPolicies: Drop unnecessary check from ApplyPolicyVersion
0df559832b cmPolicies: Pass policy version as std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1864
2018-03-22 15:24:49 -04:00
Brad King
d78d750c04 Merge topic 'clarify_inherited_properties'
ff6234509e Help: Clarify behavior of INHERITED properties
9cc97ab4dc Tests: Add tests for INHERITED property chaining

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1879
2018-03-22 08:33:53 -04:00
Ruslan Baratov
4eb5d851d5 Help: Add 'lib32|libx32|lib64' paths to find_package prefixes
Document the conditions when 'lib32|libx32|lib64' variants will be added to the
list of possible installation prefixes.
2018-03-21 20:59:09 +03:00
Marc Chevrier
768225837d list: Add SUBLIST sub-command
Issue: #17823
2018-03-21 12:54:53 -04:00
Brad King
54ae5ee1d3 Merge topic 'pr.target_compile_definitions'
3af1daa186 Help: Document target_compile_definitions handling of -D

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1873
2018-03-21 09:08:58 -04:00
Brad King
45408b5ea1 cmake_minimum_required: Optionally set policies with version range
Teach `cmake_minimum_required` and `cmake_policy(VERSION)` to support a
version range of the form `<min>[...<max>]`.  Define this to mean that
version `<min>` is required, but known policies up to those introduced
by `<max>` will be set to `NEW`.  This will allow projects to easily
specify a range of versions for which they have been updated.
2018-03-21 08:00:28 -04:00
Craig Scott
ff6234509e Help: Clarify behavior of INHERITED properties
Fixes: #17839
2018-03-21 21:39:54 +11:00
Ruslan Baratov
3af1daa186 Help: Document target_compile_definitions handling of -D
Add an example of using the `target_compile_definitions` command and a
note about usage of ``-D`` in items.
2018-03-20 14:06:15 -04:00
Brad King
d41abae70f Merge topic 'list-join'
a58158727b list(): add `JOIN` sub-command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1846
2018-03-20 09:40:40 -04:00
Marc Chevrier
a58158727b list(): add JOIN sub-command 2018-03-20 14:28:17 +01:00
Brad King
882ba7fd11 Merge topic 'doc-set_target_properties-clarify'
89ee7ce3ea Help: Reference set_property from set_target_properties
c27e3e0f2b Help: Clarify that set_target_properties supports multiple targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1866
2018-03-19 11:18:31 -04:00
Brad King
180a36e243 Merge topic 'find-package_root-restore'
eb35d8884b find_package: Use PackageName_ROOT variables as search prefixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1858
2018-03-19 08:30:05 -04:00
Brad King
cded54f48d Merge topic 'doc-list-command'
81226c73a4 Help: refresh list() command documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1860
2018-03-19 08:28:51 -04:00
Brad King
89ee7ce3ea Help: Reference set_property from set_target_properties 2018-03-19 08:05:29 -04:00
Brad King
c27e3e0f2b Help: Clarify that set_target_properties supports multiple targets
Reported-by: Alan W. Irwin <irwin@beluga.phys.uvic.ca>
2018-03-19 07:44:42 -04:00
Craig Scott
80784ef77f Merge topic 'project-homepage-url'
73f9b2974c project: Add HOMEPAGE_URL named parameter
fd28c382b4 project: Add <PROJECT-NAME>_DESCRIPTION
9b57cb62ea Help: Fix minor typo in docs for CMAKE_PROJECT_DESCRIPTION
c89993d529 Tests: Avoid enabling languages unnecessarily in RunCMake.project

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1816
2018-03-17 18:24:44 -04:00
Alex Turbov
73f9b2974c project: Add HOMEPAGE_URL named parameter
This sets variables like PROJECT_HOMEPAGE_URL, which can be
used as default values for various things (packaging modules,
doxygen defaults, etc.). Some packaging modules have been
updated to do this as part of this commit.

Co-Author: Craig Scott <craig.scott@crascit.com>
2018-03-17 08:25:48 +11:00
Craig Scott
fd28c382b4 project: Add <PROJECT-NAME>_DESCRIPTION
For consistency with the VERSION keyword, also define the
<PROJECT-NAME>_DESCRIPTION variable.
2018-03-17 08:25:48 +11:00
Marc Chevrier
81226c73a4 Help: refresh list() command documentation
Reformat `list` command documentation be consistent with the `string`
command.
2018-03-16 15:28:14 +01:00
Brad King
eb35d8884b find_package: Use PackageName_ROOT variables as search prefixes
This feature was originally added by commit v3.9.0-rc1~71^2~2 (find_*:
Add a new PackageRoot search path group, 2017-05-03) and documented by
commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search path
group, 2017-05-03).  However, we had to disable the feature and remove
the documentation in commit v3.9.1~2^2 (find_*: Disable the PACKAGE_ROOT
search path group for CMake 3.9, 2017-08-08) due to breaking projects
that used `PackageName_ROOT` variables themselves.

Add policy `CMP0074` to restore the `PackageName_ROOT` variable behavior
in a compatible way.  Also revise the stack of root paths to store the
paths themselves rather than the package names.  This way the policy can
be considered at the `find_package` call site instead of individual
`find_` calls inside a find module.

Co-Author: Chuck Atkins <chuck.atkins@kitware.com>
Issue: #17144
2018-03-16 09:19:28 -04:00
Brad King
2ab900c71b Merge topic 'compile-options-shell'
ce0b983216 target_compile_options: Add syntax to specify shell strings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1841
2018-03-15 07:55:14 -04:00
Brad King
ce0b983216 target_compile_options: Add syntax to specify shell strings
Options specified via `COMPILE_OPTIONS` and `INTERFACE_COMPILE_OPTIONS`
are deduplicated, but individual options can legitimately be duplicated
when grouped with other options, e.g.

    -D A -D B

After deduplication that becomes `-D A B`.  Therefore we need a way to
treat groups of options as units during deduplication.  A simple approach
is to specify each group as one option, e.g.

    "-D A" "-D B"

However, that conflicts with options that legitimately have spaces.  To
break this ambiguity, add a `SHELL:` prefix syntax to specify that an
option should be parsed like shell command line arguments after
deduplication, e.g.

    "SHELL:-D A" "SHELL:-D B"

These will survive deduplication intact, and then be parsed to produce
`-D A -D B` on the final command line.

Fixes: #15826
2018-03-14 11:10:25 -04:00
Craig Scott
6a2a9d107d Help: Fix incorrect CMAKE_PROJECT_xxx docs
The docs for CMAKE_PROJECT_NAME and CMAKE_PROJECT_DESCRIPTION
were erroneously documenting the behavior of PROJECT_NAME and
PROJECT_DESCRIPTION respectively. Fix these and update the
project() docs to also mention CMAKE_PROJECT_NAME and
CMAKE_PROJECT_DESCRIPTION.

Fixes: #17815
2018-03-14 07:33:38 +11:00