Commit Graph

967 Commits

Author SHA1 Message Date
Marc Chevrier
46896d98bb foreach(): loop variables are only available in the loop scope
Fixes: #20553
2021-04-28 19:44:25 +02:00
Zack Galbreath
b60789a758 Help: Document CTest custom test measurements 2021-04-27 15:00:26 -04:00
Brad King
970f175d88 Merge topic 'ctest_junit'
25bf514447 ctest: Add support for writing test results in JUnit XML format

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Zack Galbreath <zack.galbreath@kitware.com>
Acked-by: Michael Hirsch <michael@scivision.dev>
Acked-by: MvdHurk <maikelvandenhurk@hotmail.com>
Acked-by: Alexander Richardson <arichardson.kde@gmail.com>
Merge-request: !6020
2021-04-27 13:53:55 -04:00
Brad King
6aabf2790c Merge topic 'file-REAL_PATH-EXPAND_TILDE'
e4b793c614 file(REAL_PATH): add option EXPAND_TILDE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Michael Hirsch <michael@scivision.dev>
Merge-request: !6033
2021-04-26 11:30:57 -04:00
Zack Galbreath
25bf514447 ctest: Add support for writing test results in JUnit XML format
Addresses #18654
2021-04-26 08:55:22 -04:00
Marc Chevrier
e4b793c614 file(REAL_PATH): add option EXPAND_TILDE
This option enables the replacement of any leading tilde with the path
to the user's home directory.
2021-04-22 08:08:47 +10:00
Robert Maynard
b94bf12a31 Help: cmake_minimum_required specify max is only for policies
Make it even clearer that for the signature `<version>...<version>` that
the second value is only used for policies, and is not a clamp range
of supported CMake versions.
2021-04-20 13:50:42 -04:00
Brad King
4c0d69e813 Merge topic 'Xcode-add_custom_command-DEPFILE'
253aff6c94 Xcode: Add support of DEPFILE for add_custom_command, part 2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6015
2021-04-20 09:59:53 -04:00
Brad King
c6fa8cd3f2 Merge topic 'doc-if-IS_ABSOLUTE'
6234afdff4 Help: Document special cases for if(IS_ABSOLUTE)
789307b02f Help: Behavior of file(TO_NATIVE_PATH) depends on the host platform

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6016
2021-04-20 09:58:53 -04:00
Craig Scott
6234afdff4 Help: Document special cases for if(IS_ABSOLUTE)
The meaning of "absolute path" was previously assumed knowledge,
but a number of special cases were left unspecified. The way some of
these are handled differs to the way that cmake_path(IS_ABSOLUTE)
works, so document those special cases so that the differing behavior
between these two commands is clearly defined.
2021-04-17 19:41:53 +10:00
Craig Scott
789307b02f Help: Behavior of file(TO_NATIVE_PATH) depends on the host platform 2021-04-17 19:41:53 +10:00
Marc Chevrier
253aff6c94 Xcode: Add support of DEPFILE for add_custom_command, part 2
This MR extend the support of 'DEPFILE' to buildsystem version 1.

Issue: #20286
2021-04-17 11:05:26 +02:00
Marc Chevrier
d67cc4882d Xcode: Add support of DEPFILE for add_custom_command
Issue: #20286
2021-04-15 12:17:31 -04:00
Marc Chevrier
0c47b91fcc Genex: add_custom_command: DEPFILE supports genex
This facility is very useful for 'Ninja Multi-Config' and required
as well for future support of DEPFILE in 'Xcode' and 'Visual Studio'
generators (#20286).
2021-04-12 13:06:49 +02:00
Brad King
792027f70f Merge topic 'doc-imported-soname'
4d6e899578 Help: Document in add_library how to import libraries with SONAME

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5975
2021-04-05 11:34:24 -04:00
Brad King
4d6e899578 Help: Document in add_library how to import libraries with SONAME
When using `add_library` to create an `IMPORTED` library target, there
are a few target properties that are essential to correctly tell CMake
about the library file.  We already cover `IMPORTED_LOCATION` and
`IMPORTED_IMPLIB`.  Add `IMPORTED_SONAME` and `IMPORTED_NO_SONAME`,
which are important in certain cases.

Fixes: #22016
2021-04-02 12:12:28 -04:00
Brad King
d212d91f14 Merge topic 'commands-file-permissions' into release-3.20
769ff05483 Help: Clarify permission-related command options
900184616a Cleanup: Fix misspelt name of local C++ variable
635431a0c9 Tests: Check host platform instead of target for running stat
4ceb0ca59e Tests: Remove redundant files for configure_file() tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5945
2021-03-29 09:32:09 -04:00
Brad King
75dd9b6c97 Merge topic 'commands-file-permissions'
769ff05483 Help: Clarify permission-related command options
900184616a Cleanup: Fix misspelt name of local C++ variable
635431a0c9 Tests: Check host platform instead of target for running stat
4ceb0ca59e Tests: Remove redundant files for configure_file() tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5945
2021-03-29 09:32:09 -04:00
Craig Scott
769ff05483 Help: Clarify permission-related command options
The previous docs did not make clear that at most only one of the three
permissions-related options can be given for configure_file() or
file(GENERATE) and that USE_SOURCE_PERMISSIONS is already the
default behavior for these commands.

Use consistent wording to refer to the input and output files for
configure_file().

Add missing "versionadded" directives on some of these keywords.

Use the consistent wording and keyword ordering between the
configure_file(), file(GENERATE) and file(COPY) commands.
2021-03-27 09:54:27 +11:00
friendlyanon
96a7040107 project: Define variables indicating whether project is top level
Define `PROJECT_IS_TOP_LEVEL` and `<PROJECT-NAME>_IS_TOP_LEVEL`.  The
latter is a STATIC cache entry just like other `<PROJECT-NAME>_*`
variables so that it is globally scoped.

Issue: #20310
Fixes: #21961
2021-03-26 09:35:34 -04:00
Brad King
3706e9c97c Help: Convert project() directory variables to a definition list 2021-03-26 09:34:18 -04:00
Brad King
ea4c344453 Merge topic 'doc-custom-output-genex'
2f59b683d3 Help: Custom OUTPUT and BYPRODUCTS genexes cannot refer to targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5939
2021-03-25 10:24:38 -04:00
Craig Scott
2f59b683d3 Help: Custom OUTPUT and BYPRODUCTS genexes cannot refer to targets
Relates: #21364
2021-03-25 18:04:17 +11:00
Elsie Hupp
c13f75982f Help: Clarify configure_file #cmakedefine01 syntax and behavior
Fixes: #21935
2021-03-15 09:15:08 -04:00
Ben Boeckel
088444211e file: add COPY_FILE subcommand
The `file(COPY)` subcommand is overloaded and busy for such a simple
operation. Instead, make a simpler subcommand with error handling
support.
2021-03-10 10:43:18 -05:00
Robert Maynard
934861e354 Find: Document that first argument to PATHS and HINTS can be ENV{} 2021-03-05 09:59:39 -05:00
Brad King
9bf40d8027 file(RENAME): Add option to not replace existing path
Add a `NO_REPLACE` option that prevents overwriting `<newname>`
if it exists.
2021-03-04 08:49:48 -05:00
Brad King
c61292726c file(RENAME): Add option to capture error message on failure 2021-03-04 08:44:06 -05:00
Michael Hirsch, Ph.D
22140f7af3 Help: Add internal links to if() docs 2021-02-18 10:20:34 -05:00
Brad King
5dd356cefc Help: Convert some genex names to explicit cross-references
Since commit c2dc7e0f53 (Help: Convert genex documentation to sphinx
domain objects, 2021-01-15) we can use `:genex:` cross-references to
link to named generator expressions.  Update some places to do this.

This is meant to demonstrate the capability, not as a comprehensive
sweep.
2021-02-05 16:05:25 -05:00
Brad King
07ca40408a Merge topic 'doc-find-env-vars'
c40e81ce80 Help: Restore docs that find_library considers LIB, not INCLUDE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5772
2021-02-05 06:55:37 -05:00
Brad King
c40e81ce80 Help: Restore docs that find_library considers LIB, not INCLUDE
Documentation updates in commit 02f527c66a (Find: Provide global
controls for the `NO_[]_PATH` call options, 2019-06-12,
v3.16.0-rc1~541^2) accidentally switched the `find_library`
documentation to mention `INCLUDE` where it should be `LIB`.

While at it, update `find_file` and `find_path` to mention
`INCLUDE` and `PATH` in the order they are considered.
2021-02-04 09:09:25 -05:00
Asit Dhal
5af38a11ce try_run: Allow to set working directory
Fixes: #17634
2021-02-03 08:42:05 +01:00
Brad King
8387aa20f2 Merge topic 'issue-19198'
255df8622b file(GENERATE): Support new line style

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !5649
2021-02-02 08:53:07 -05:00
Asit Dhal
255df8622b file(GENERATE): Support new line style
Fixes: #19198
2021-02-01 01:38:19 +01:00
william.r.dieter
8213390a3e Added SETUID and SETGID to the list of accepted file permissions
Signed-off-by: william.r.dieter <william.r.dieter@intel.com>
2021-01-29 16:30:52 -05:00
Marc Chevrier
76cea3dfe2 cmake_path: rename 'GET ... RELATIVE_PATH' to 'GET ... RELATIVE_PART'
For consistency, subcommand 'HAS_RELATIVE_PATH' is also renamed
to 'HAS_RELATIVE_PART'.

Fixes: #21385
2021-01-28 11:06:31 +11:00
Michael Hirsch, Ph.D
e63e83d2b8 Help: Document that if(EXISTS) does not expand ~
Fixes: #21729
2021-01-26 09:50:01 -05:00
Craig Scott
c3ddb484d7 Help: Restructure and clarify cmake_path() docs
Relates: #21385
2021-01-16 23:58:09 +11:00
Marc Chevrier
50b8dc8735 Merge topic 'cmake_path-stabilization'
76f0bcdfb6 cmake_path: various updates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5695
2021-01-15 05:47:02 -05:00
Marc Chevrier
76f0bcdfb6 cmake_path: various updates
To follow discussions in #21385 and !5682:
* Fix bug in cmCMakePath::IsSuffix() method
* cmake_path(HASH) always normalized paths (NORMALIZE option removed)
2021-01-13 15:27:49 +01:00
Asit Dhal
ac3ccc393e install(files): Support genex in rename option
Fixes: #19903
2021-01-13 11:27:56 +01:00
Shannon Booth
55ba98556f Help: Add sections to if() conditions documentation 2021-01-09 10:03:46 +13:00
Marc Chevrier
cfd8a5ac1f Makefiles: Add support of DEPFILE for add_custom_command
Issue: #20286
Fixes: #21415
2020-12-23 15:47:46 +01:00
Brad King
72a28635b8 Merge topic 'issue-20134'
b68699b717 target_include_directories: Support AFTER option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5633
2020-12-22 09:13:08 -05:00
Brad King
3cf1a8c59b Merge topic 'issue-15653'
c3385dd8bd file(GENERATE): Support options to manipulate file permissions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5437
2020-12-22 09:12:20 -05:00
NeroBurner
af7882ba6e Help: replace deprecated $<CONFIGURATION> generator expression
The `$<CONFIGURATION>` genex has been deprecated since CMake 3.0.
Use `$<CONFIG>` instead in the `add_test` example.
2020-12-21 13:54:25 -05:00
Asit Dhal
c3385dd8bd file(GENERATE): Support options to manipulate file permissions
Fixes: #15653
2020-12-21 12:16:16 +01:00
Asit Dhal
b68699b717 target_include_directories: Support AFTER option
Fixes: #20134
2020-12-19 14:51:39 +01:00
Kyle Edwards
dcf9f4d2f7 Ninja Multi-Config: Add support for cross-config custom commands
Co-Author: Brad King <brad.king@kitware.com>
2020-12-15 07:01:21 -05:00