Commit Graph

520 Commits

Author SHA1 Message Date
Brad King
d26f5b6889 Merge branch 'backport-revert-install-code-script-genex' into release-3.13
Merge-request: !2474
2018-10-11 08:11:21 -04:00
Brad King
0f48fbaa72 install: Revert CODE,SCRIPT support for generator expressions
Revert commit v3.13.0-rc1~441^2 (install: Teach CODE,SCRIPT modes to
evaluate generator expressions, 2018-05-29).  Unfortunately it has
been found to break existing code in a real project, e.g.

    install(CODE [[
        message("$<FOOBAR>")
    ]])

Address this regression by reverting support for the 3.13 release
series.  Support can be restored later with a policy for compatibility.

Issue: #15785
Fixes: #18435
2018-10-11 07:05:55 -04:00
Brad King
efa5d5c781 Merge branch 'doc-regex-backslash' into release-3.13
Merge-request: !2460
2018-10-09 06:34:34 -04:00
Brad King
fab2c2339b Help: Fix documentation of escape sequences in a regex
Documentation added by commit 4b35dab891 (Help: Document how escape
sequences work in a regex, 2018-07-18) is only correct for backslashes
inside `[]` groups.  The regex engine does interpret `\` escapes
elsewhere.  Fix the docs.

Inspired-by: R2RT <artur.ryt@gmail.com>
Fixes: #18428
2018-10-09 06:31:37 -04:00
Brad King
c268fcc2ed Merge branch 'doc-target_link_libraries-keywords-not-genex' into release-3.13
Merge-request: !2449
2018-10-08 11:52:39 -04:00
Brad King
c2356d60d8 Merge branch 'project-always-set-desc-url' into release-3.13
Merge-request: !2457
2018-10-08 11:21:48 -04:00
Brad King
bad9bc78e3 Merge branch 'list-SORT-docs' into release-3.13
Merge-request: !2453
2018-10-08 11:21:23 -04:00
Brad King
cd8c79e163 Help: Clarify target_link_libraries keywords and generator expressions
The `optimized` and `debug` keyword items are meaningful only to
the `target_link_libraries` command and have no meaning when
produced by a generator expression.  State this explicitly.
Also recommend use of a quoted argument when the genex itself
may contain a semicolon.

Fixes: #18424
2018-10-08 11:18:14 -04:00
Craig Scott
f8a086a86b project(): Ensure DESCRIPTION and HOMEPAGE_URL variables are set
If a project() call does not have DESCRIPTION or HOMEPAGE_URL
options, it must still set the relevant variables or else those variables will
inherit values from an earlier project() call. That is inconsistent with how
VERSION is handled and is likely to be unexpected. The docs were also
ambiguous about what should happen in such cases.
2018-10-08 08:28:17 +11:00
Craig Scott
cdf8d79e9f Help: Improve/fix incorrect docs for list(SORT) sub-options 2018-10-06 18:10:38 +10:00
Joachim Wuttke (l)
c90f3dff82 Help: Clarify find_package Module and Config mode relation 2018-10-04 16:43:40 -04:00
Brad King
26dac50220 Help: Remove redundant recommendation
We suggest that users prefer the basic signature in two places.
Drop the latter and move its related content to a better section.
2018-10-04 16:43:02 -04:00
Joachim Wuttke (l)
11058a2e7c Help: Add internal section link to find_package command docs 2018-10-04 16:42:42 -04:00
Joachim Wuttke (l)
aaf5ea2d70 Help: Add section headers to find_package command
The document is pretty long but is already mostly organized into
sections.  Add explicit section headers.
2018-10-04 14:57:56 -04:00
Joachim Wuttke (l)
56310b0671 Help: Move find_package NO_POLICY_SCOPE to more appropriate location 2018-10-04 14:57:56 -04:00
Joachim Wuttke (l)
336dce1c95 Help: Add table of contents to find_package command docs 2018-10-04 14:57:55 -04:00
Joachim Wuttke (l)
463d59d331 Help: Rephrase summary in find_package command docs 2018-10-04 14:57:49 -04:00
Kyle Edwards
fbd89b6753 Help: Add note about CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS 2018-10-01 16:10:33 -04:00
Brad King
cac09cc52c Merge topic 'customcommandworkingdirectory'
f158ac19e1 add_custom_{command,target}: WORKING_DIRECTORY generator expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2409
2018-09-28 11:17:09 -04:00
Jon Chronopoulos
f158ac19e1 add_custom_{command,target}: WORKING_DIRECTORY generator expressions
This teaches add_custom_command and add_custom_target WORKING_DIRECTORY
about generator expressions

Fixes: #14089
2018-09-28 11:15:33 -04:00
Marc Chevrier
f9717725f9 link_directories(): enhance capabilities 2018-09-25 23:59:59 +10:00
Marc Chevrier
a71caab46b LINK_DIRECTORIES: Add new properties and commands
These new capabilities enable to manage link directories

Two new properties:
* target properties: LINK_DIRECTORIES and INTERFACE_LINK_DIRECTORIES

One new command
* target_link_directories(): to populate target properties

Fixes: #17215
2018-09-25 23:59:58 +10:00
Craig Scott
2a2f0ac231 Help: Clarify handling of non-integer components in if() version tests 2018-09-17 18:12:08 +08:00
Brad King
333804fa0e Merge topic 'out-of-dir-linking'
a1ad0a699b target_link_libraries: Allow use with targets in other directories
9bbae5ae28 cmTarget: Future-proof AddLinkLibrary target lookup scope
f9cb6f618a cmExportFileGenerator: Use cmGeneratorTarget::ResolveTargetReference
18441a6269 cmGeneratorTarget: Factor target name resolution out of link item resolution
2f708f5d65 Make internal TARGET_PROPERTY generator expressions more robust
94a75801c8 Android.mk: De-duplicate link libraries logic during export
8a63b23d16 cmGlobalGenerator: Remove unused FindLocalGenerator method

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Patrick Stotko <stotko@cs.uni-bonn.de>
Merge-request: !2370
2018-09-14 13:25:07 -04:00
Brad King
a1ad0a699b 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.

Targets named on the RHS will need to be looked up during generation in
the scope of the call site rather than the scope of the LHS target.
Introduce an internal syntax in `[INTERFACE_]LINK_LIBRARIES` properties
to specify target names that need to be looked up in a directory other
than that containing the target on which the property is set.  Add
minimal documentation of the syntax to help users that encounter it.

Unfortunately CMake previously did allow such calls in the case that
only `INTERFACE` libraries are specified, but those libraries would be
looked up in the target's directory rather than the caller's.  Add
policy `CMP0079` to enable the new behavior with new lookup scope in a
compatible way.

Fixes: #17943
2018-09-12 13:06:36 -04:00
Brad King
f13d4b1077 Merge topic 'replace-os-x-name-with-macos'
ab2e35d614 Replace occurrences of "Mac OS X" with "macOS" in comments
fc1602456a Help: Replace occurrences of "Mac OS X" with "macOS"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Gregor Jasny <gjasny@googlemail.com>
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Merge-request: !2351
2018-09-11 08:28:05 -04:00
Brad King
e9f72e9c94 Merge topic 'docs/setdirproprs'
6d8cabe8d4 Help: Clarify INCLUDE_DIRECTORIES directory property behavior
7b9d8ce168 Help: Clarify wording of set_directory_properties docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2337
2018-09-11 08:26:42 -04:00
Brian Heim
7b9d8ce168 Help: Clarify wording of set_directory_properties docs 2018-09-10 08:28:30 -04:00
Taylor Holberton
228a2b0d82 Help: Clarify cmake_host_system_information memory units
The memory size query implementations report in units of one mebibyte
(2^20).  Clarify the unit in the documentation because "megabyte" might
also be interpreted as 10^6.
2018-09-10 15:55:07 +08:00
Bartosz Kosiorek
fc1602456a Help: Replace occurrences of "Mac OS X" with "macOS"
Apple's main Operating system changed their name from OS X to macOS:

    https://www.engadget.com/2016/06/13/os-x-is-now-macos/

Revise documentation accordingly.
2018-09-05 16:10:49 -04:00
Betsy McPhail
5fc11b34e4 Help: Add CAPTURE_CMAKE_ERROR to ctest_submit and ctest_update documentation
Also, added CAPTURE_CMAKE_ERROR to vim synax file for ctest_submit,
ctest_update and ctest_memcheck.
2018-08-28 21:09:53 -04:00
David Demelier
e558ada977 Help: Document alternative to include_directories
Many existing tutorials suggest `include_directories` but that does
not handle propagation to dependencies and such.  Add a link to its
documentation suggesting `target_include_directories` instead.
2018-08-23 16:00:02 -04:00
Robert Maynard
1a0f1a25a4 Help: Clarify the unset command 2018-08-21 14:16:32 -04:00
Betsy McPhail
a0916a4692 Help: Add RETURN_VALUE as an option to ctest_submit(CDASH_UPLOAD 2018-08-15 16:29:53 -04:00
Craig Scott
349f8bfb25 Merge topic 'doc-consistently-reference-packagename'
30d08bdce9 doc: Consistently use <PackageName> for describing the name of a package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2283
2018-08-15 08:18:49 -04:00
Jean-Christophe Fillion-Robin
30d08bdce9 doc: Consistently use <PackageName> for describing the name of a package 2018-08-14 20:54:56 +10:00
Robert Maynard
6b17d85873 Help: Document when LINK_FLAGS and STATIC_LIBRARY_FLAGS are used 2018-08-09 12:54:16 -04:00
Craig Scott
e3664debd2 Merge topic 'doc-find_package-root'
492ade276b Help: Add explicit <PackageName>_ROOT variable documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2225
2018-07-20 18:58:43 -04:00
Brad King
492ade276b Help: Add explicit <PackageName>_ROOT variable documentation
Add documentation for both the CMake variable and environment variable
of this name pattern.  Update references to these names to link to their
documents.  Clarify the pattern used to construct their names.
2018-07-20 09:43:08 -04:00
Brad King
4b35dab891 Help: Document how escape sequences work in a regex
Our regex engine doesn't interpret `\`-escapes but CMake language escape
sequences may be used to pass literal whitespace characters to it.
2018-07-18 10:36:00 -04:00
Brad King
42065828c3 Merge topic 'doc-add_library-IMPORTED_OBJECTS'
62b4df1e84 Help: Mention IMPORTED_OBJECTS in add_library docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2216
2018-07-16 09:07:23 -04:00
Brad King
62b4df1e84 Help: Mention IMPORTED_OBJECTS in add_library docs
The `IMPORTED_OBJECTS` is to object libraries as `IMPORTED_LOCATION`
is to normal libraries.

Fixes: #18176
2018-07-16 08:17:51 -04:00
Brad King
c878e6f8cc Merge topic 'option-normal-variable'
2a5f5c0e31 option: respect existing normal variable
12e6f83319 Option: Add a test that verifies interaction with normal variables
5bb3d40a28 cmOption: Remove VTK 4.0 workarounds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2155
2018-07-09 10:25:33 -04:00
Robert Maynard
2a5f5c0e31 option: respect existing normal variable
Add policy CMP0077 to change this behavior in a compatible way.
2018-07-09 07:48:28 -04:00
Brad King
d101446a56 Merge topic 'doc-add_compile_definitions'
89e3e62e13 Help: fix add_compile_definitions() documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2192
2018-07-05 11:41:23 -04:00
Brad King
326ebdf12a Merge topic 'revert-subdirectory-linking'
0d7114987c Revert "target_link_libraries: Allow use with targets in other directories"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2191
2018-07-05 11:31:17 -04:00
Brad King
ca733cdf45 Merge topic 'math-hex'
5dbee9d2d0 math: Add options to calculate and format output as hexadecimal
8661e7052c math: Diagnose divide-by-zero
7c4c13ffef math: Reject unexpected expression input explicitly
5b0f73a15a math: Use 64-bit integer type for computation
963b8d9f6c math: Add RunCMake.math test to prepare for error cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2056
2018-07-05 10:26:05 -04:00
Brad King
0f3d7a1398 Merge branch 'doc-add_compile_definitions' into release-3.12
Merge-request: !2192
2018-07-05 10:23:20 -04:00
Marc Chevrier
89e3e62e13 Help: fix add_compile_definitions() documentation
Fixes: #18147
2018-07-05 10:21:09 -04:00
Brad King
84ecbf44b6 Merge branch 'revert-subdirectory-linking' into release-3.12
Merge-request: !2191
2018-07-03 12:54:32 -04:00