Commit Graph

1018 Commits

Author SHA1 Message Date
Craig Scott
4e5d871e74 Merge topic 'doc-cleanups-3.21'
8d1944c675 Help: Expand details for file(COPY_FILE)
c8ea886123 Help: Re-order file() sub-commands in Filesystem section
b5a96716eb Help: Clarify which project() call PROJECT_IS_TOP_LEVEL is for
8be7694d97 Help: Fix trivial typo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6361
2021-07-20 07:54:58 -04:00
Craig Scott
8d1944c675 Help: Expand details for file(COPY_FILE) 2021-07-20 08:49:04 +10:00
Craig Scott
c8ea886123 Help: Re-order file() sub-commands in Filesystem section
The file(COPY_FILE) sub-command is closely related to the
file(COPY) sub-command. Move the former to just before the
latter for improved continuity. The file(RENAME) sub-command is
also somewhat related to file(COPY_FILE), so it was also moved to
keep it just before file(COPY_FILE).

The file(MAKE_DIRECTORY) sub-command was also moved to just
before the file(REMOVE) and file(REMOVE_RECURSE) sub-commands
to keep them together and improve logical flow of operations.
2021-07-20 08:39:34 +10:00
Brad King
1f1f952e46 Merge topic 'Help-ctest_memcheck-shared-args'
85e740312f Help/ctest_test: add a comment to also update `ctest_memcheck`
731cfd45fd Help/ctest_memcheck: mention `ctest_test` arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6351
2021-07-19 12:46:14 -04:00
Ben Boeckel
85e740312f Help/ctest_test: add a comment to also update ctest_memcheck
Since these commands share a common argument parser, the documentation
should be kept synchronized.
2021-07-19 12:45:17 -04:00
Craig Scott
8be7694d97 Help: Fix trivial typo 2021-07-18 15:57:06 +10:00
Ben Boeckel
731cfd45fd Help/ctest_memcheck: mention ctest_test arguments
These are handled internally by inheriting `ctest_test`'s argument
bindings. Synchronize the documentation.
2021-07-14 15:23:48 -04:00
Eugene Shalygin
a2e9fe38e4 find_package: Add variable to make package REQUIRED
Add a `CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>` variable is complement
to `CMAKE_DISABLE_FIND_PACKAGE_<PackageName>` with just the opposite
behaviour: it turns non-required find_package call into the required one.

While optional package dependencies usually result in simple and clean
build logic, sometimes people want to be sure those optional
dependencies will be found and used. Examples are reproducible builds
and build instructions for 3rd parties. People choose to make
find_package calls REQUIRED and put them behind an option(). Such
workarounds blend build logic with build environment management and do
not look elegant.
2021-07-08 08:03:38 -04:00
Craig Scott
c97823b9b7 Merge topic 'doc-3.21-release'
24b76eaa93 Help: Improve readability and accuracy of runtime deps-related content
308e5b30c9 Help: Tighten install(SCRIPT) wording for ALL_COMPONENTS option
52dec01729 Help: Add missing versionadded 3.21 for file(RENAME) options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6302
2021-07-05 20:02:28 -04:00
Craig Scott
24b76eaa93 Help: Improve readability and accuracy of runtime deps-related content
Duplicated textual patterns are factored out to make the text
more readable. The POST_INCLUDE_FILES and POST_EXCLUDE_FILES
were also previously missing from the main syntax block for
install(RUNTIME_DEPENDENCY_SET).
2021-07-04 17:37:29 +10:00
Craig Scott
308e5b30c9 Help: Tighten install(SCRIPT) wording for ALL_COMPONENTS option
In particular, mention the mutually exclusive nature with the
COMPONENT option. Fix the inconsistent way the versionadded
details were added for that text too.
2021-07-03 17:10:09 +10:00
Craig Scott
52dec01729 Help: Add missing versionadded 3.21 for file(RENAME) options 2021-07-03 17:10:09 +10:00
Zack Galbreath
0962cbf21d help: update ctest attached file example
Clarify that multiple files can be attached to a given test at runtime
2021-07-01 15:16:29 -04:00
Zack Galbreath
5489ce74b3 ctest: support <CTestMeasurement> for runtime measurements
Teach CTest to parse output for <CTestMeasurement> in addition to
<DartMeasurement> for measurements defined at runtime.

Use a new class (cmCTestTestMeasurementXMLParser) derived from cmXMLParser
to parse the data and attributes these XML elements. This is an improvement
over our previous approach of using a series of regular expressions.

As part of this commit we also rename some member variables and methods
to make their purpose more clear.

DartStuff                        -> AllTestMeasurementsRegex
DartStuff1                       -> SingleTestMeasurementRegex
DartString                       -> TestMeasurementsOutput
GenerateDartOutput()             -> GenerateCTestXML()
GenerateRegressionImages()       -> RecordCustomTestMeasurements()
cmCTestRunTest::DartProcessing() -> ParseOutputForMeasurements()
2021-07-01 15:16:23 -04:00
Heiko Thiel
0106842af4 Help: Clarify condition of tree command from source_group. 2021-06-23 17:24:09 +02:00
Brad King
9612034cac Merge topic 'doc-source_group-scope'
2abce79409 Help: Clarify the usage scope of source_group

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6246
2021-06-21 09:58:04 -04:00
Heiko Thiel
2abce79409 Help: Clarify the usage scope of source_group
Fixes: #18856
2021-06-18 12:52:43 -04:00
Zack Galbreath
bd38749fd4 ctest: allow test output to add labels
Parse test output for <CTestLabel>...</CTestLabel>.
If found, add this value to the list of labels associated with this test.
2021-06-17 14:09:01 -04:00
Marc Chevrier
4665d1e69a Help: cmake_path: fix erroneous example for IS_PREFIX
Fixes: #22302
2021-06-12 11:23:47 +02:00
Brad King
5fd68d3ef7 Merge topic 'vs-custom-depfile'
526e2ef71c VS: Add support for add_custom_command DEPFILE
794ad78abb Help: Generalize release note filename for add_custom_command DEPFILE
7291f31254 cmTransformDepfile: Add support for MSBuild AdditionalInputs format
a6de8ec51b cmTransformDepfile: Make directory for transformed depfile automatically

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6206
2021-06-10 08:23:45 -04:00
Brad King
526e2ef71c VS: Add support for add_custom_command DEPFILE
Transform the depfile into MSBuild `AdditionalInputs` content.  Add
MSBuild Targets to update `AdditionalInputs` and the `.tlog` files for
future builds without actually modifying the `.vcxproj` file.

Fixes: #20286
2021-06-09 10:09:58 -04:00
Zack Galbreath
02f1271bdf ctest: allow test output to override the 'details' field
Parse test output for <CTestDetails>...</CTestDetails>.
If found, use this value to override the default 'Details' string reported
to CDash.
2021-06-09 08:31:32 -04:00
Brad King
5c18c8a178 Merge topic 'ctest_measurement_file'
cbcb92d1cb ctest: add support for attaching files to tests at run time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6192
2021-06-09 08:04:23 -04:00
Brad King
7aad9e8685 Merge topic 'add_hip_language'
8514ee9b31 HIP: analyze output of `hipcc` to determine default GPU architecture
20d086f1a2 HIP: All HIP tests now run on CMake's current AMD hardware
2e86e50c2f HIP: Add HIP to all the Check* modules
947dbed0aa HIP: Automatically inject the `hip::device` runtime target
b50bfc8913 HIP: Add language to CMake
ff0d2858e1 HIP: Extract clang compiler details from hipcc
bd844387df ROCMClang: Add the ROCm toolkit derived clang compiler to CMake
590553f322 Compilers: protect use of  __has_include
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Zack Galbreath <zack.galbreath@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Acked-by: Axel Huebl <axel.huebl@plasma.ninja>
Merge-request: !6121
2021-06-09 07:53:32 -04:00
Zack Galbreath
cbcb92d1cb ctest: add support for attaching files to tests at run time
Allow tests to specify files to upload at runtime. Previously this was
only possible to specify at configure time with the ATTACHED_FILES
test properties.

This commit also fixes a bug in how our test data tarballs were generated
by CTest. Previously, if you tried to attach a file outside of the binary
directory, CTest would generate a tar file with a relative path, and tar
would not allow you to extract it. We resolve this problem by creating
tar files with a flat directory structure instead.

Fixes: #22284
2021-06-08 09:27:19 -04:00
Robert Maynard
b50bfc8913 HIP: Add language to CMake 2021-06-07 19:25:33 +00:00
Kyle Edwards
72f2448e82 Help: Add documentation for runtime dependency installation 2021-06-04 15:25:18 -04:00
Brad King
9c33ff4dda Merge topic 'find_item-NO_CACHE'
87b71eec62 find_*: Add support for option NO_CACHE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6181
2021-06-03 08:11:04 -04:00
Brad King
e6bcd5e45a Merge topic 'doc_regex'
0d210b92fa Help: links to CMake regex syntax

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6179
2021-06-03 08:09:34 -04:00
Marc Chevrier
87b71eec62 find_*: Add support for option NO_CACHE
Request that find result is stored in a normal variable rather than a
cache entry.

Fixes: #20687
Issue: #20743
2021-06-02 14:55:00 -04:00
Michael Hirsch
0d210b92fa Help: links to CMake regex syntax 2021-06-02 10:30:21 -04:00
Brad King
cf470d8dac Merge topic 'command_target'
1cb4f592a0 add_custom_command: Target-dependent generator expression support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6176
2021-06-02 07:39:44 -04:00
Brad King
399a321a64 Merge topic 'get-runtime-dependencies-file-filter'
a12639e658 file(GET_RUNTIME_DEPENDENCIES): Add POST_{IN,EX}CLUDE_FILES arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6170
2021-06-02 07:38:17 -04:00
Kyle Edwards
a12639e658 file(GET_RUNTIME_DEPENDENCIES): Add POST_{IN,EX}CLUDE_FILES arguments 2021-06-01 09:02:33 -04:00
Brad King
02957bb589 Merge topic 'install-imported-runtime-artifacts'
f7ba3a0589 FileAPI: Populate information for IMPORTED_RUNTIME_ARTIFACTS
df7040a271 install(): Add IMPORTED_RUNTIME_ARTIFACTS mode
60e752ced8 Refactor: Move common methods into cmInstallGenerator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6162
2021-06-01 08:42:16 -04:00
Kyle Edwards
df7040a271 install(): Add IMPORTED_RUNTIME_ARTIFACTS mode 2021-05-31 09:02:45 -04:00
Raul Tambre
1cb4f592a0 add_custom_command: Target-dependent generator expression support
OUTPUT variant with a TARGET given to allow resolving target-based generator
expressions wouldn't work because OUTPUT is resolved before generator targets
are created, i.e. FindGeneratorTargetToUse() returns nullptr.
This is a known limitation, see #21364.

Implements #21336.
2021-05-31 10:39:58 +03:00
Brad King
3941555d93 target_link_libraries: Place $<TARGET_OBJECTS> before libraries
Linkers always use object files explicitly specified on the command line
regardless of where they appear.  Move them to the front of the list of
linked libraries in so that symbols required by the object files can be
resolved by any library.

Issue: #22149
2021-05-29 09:28:36 -04:00
Brad King
bf2717e436 Merge topic 'set-cache-keep-normal-variable'
d96eb55282 set(CACHE): do not remove normal variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6146
2021-05-25 10:03:03 -04:00
Marc Chevrier
d96eb55282 set(CACHE): do not remove normal variable
Fixes: #22038
2021-05-20 17:50:13 +02:00
Nils Gladitz
99ff75455e install: Implement new install(CODE|SCRIPT) option ALL_COMPONENTS
In a per-component installation the generated installation scripts
are invoked once for each component.

Per default custom installation script code added by install(CODE|SCRIPT)
only runs for one specific component in this context.

The new ALL_COMPONENTS option allows custom script code to be run once
for each component being installed.
2021-05-19 19:17:58 +02:00
Brad King
62b0eba266 Merge topic 'doc-link-compile-options'
2eba7d7524 Help: Add SHELL, LINKER and host/device discussions to property docs
b20c1f4880 Help: Make SHELL option examples more generic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6130
2021-05-18 09:30:44 -04:00
Craig Scott
2eba7d7524 Help: Add SHELL, LINKER and host/device discussions to property docs
Section headings are also added for each common block to help guide
the reader and improve navigation.

Fixes: #21640
2021-05-15 16:31:16 +10:00
Craig Scott
b20c1f4880 Help: Make SHELL option examples more generic
Comments at the bottom of the docs for add_compile_options() and
target_compile_options() recommend using other commands if setting
compiler definitions. Change the examples we use for the SHELL:
functionality to use -option instead of -D so that we don't violate our
own recommendations. This also makes the examples more
appropriate for use with link options as well.

Tweak the wording to not specify the type of option being discussed.
This will already be clear from the page the text is included into and
it avoids naming unrelated option types for the given page.
2021-05-15 16:30:46 +10:00
Craig Scott
b00a171b2b Help: Clarify calling cmake_minimum_required() inside a function
Fixes: #21519
2021-05-15 15:26:01 +10:00
Josef Angstenberger
7072d83772 Help: Fix typos and spelling in documentation 2021-05-07 17:00:17 +02:00
Brad King
41f9486e61 Merge topic 'generate-cmake-build-command-parallel'
d2b856bc92 ctest_build: Add the PARALLEL_LEVEL argument
fc2ac46043 build_command: Add the PARALLEL_LEVEL argument
4dd4e9dd6c cmGlobalGenerator: Add parallel parameter to GenerateCMakeBuildCommand

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !6069
2021-05-05 10:11:46 -04:00
Brad King
7973f97828 Merge topic 'doc-tls'
7398993f5b Help: Document CMAKE_TLS_VERIFY variable explicitly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6064
2021-05-05 10:08:45 -04:00
friendlyanon
d2b856bc92 ctest_build: Add the PARALLEL_LEVEL argument
Fixes: #19712
2021-05-04 20:30:18 +02:00
friendlyanon
fc2ac46043 build_command: Add the PARALLEL_LEVEL argument
Issue: #19712
2021-05-04 20:17:17 +02:00