Commit Graph

4431 Commits

Author SHA1 Message Date
Brad King
db659e18bc Merge branch 'backport-3.17-automoc-path-prefix-off' 2020-08-10 10:49:18 -04:00
Brad King
e503fbe38a Merge branch 'backport-3.16-automoc-path-prefix-off' 2020-08-10 10:41:06 -04:00
Joerg Bornemann
4c33b305a0 Autogen: Turn off moc path prefix generation by default
Change the default value of `CMAKE_AUTOMOC_PATH_PREFIX` to `OFF` to
restore compatibility with behavior of CMake 3.15 and below.

C++ source files that are generated by Qt's meta object compiler (moc)
include the header file that was passed as input argument to moc. This
is usually a path relative to the source directory, for example

    #include "../../source/dir/myobject.h"

That is problematic for reproducible builds as described in #18815.
To cope with that, the target property AUTOMOC_PATH_PREFIX was
introduced in CMake 3.16 by commit d018d27c10 (Autogen: Add moc path
prefix generation (AUTOMOC_PATH_PREFIX), 2019-09-13, v3.16.0-rc1~94^2~4).
The property is default-initialized from the variable
`CMAKE_AUTOMOC_PATH_PREFIX`, which defaults to `ON`.

If this property is ON, and myobject.h is located in an include
directory of the target, moc-generated C++ files include the file
without the "path prefix":

    #include "myobject.h"

This behavior, however, can break projects that have equally named
header files in different include directories.  As "not breaking
existing projects" trumps "have reproducible builds by default" we
change the default of `CMAKE_AUTOMOC_PATH_PREFIX` to `OFF`.

Also, it is now possible to pass `-DCMAKE_AUTOMOC_PATH_PREFIX=ON` on the
CMake command line.  Before, it was overridden in `CMakeGenericSystem`.

Fixes: #20598
Issue: #18815
2020-08-10 10:36:17 -04:00
Brad King
5fc5f4d26e add_test: Revert "Allow special characters in test name"
Revert commit f84af8e270 (add_test: Allow special characters in test
name, 2020-05-16, v3.18.0-rc1~142^2).  Unfortunately the fix breaks
projects that were working around the limitation with manual escaping.
The fix can be re-introduced with a policy in a future version.

Also add a 3.18.1 release note explaining the change.

Fixes: #21017, #20965
Issue: #19391
2020-07-28 08:04:11 +10:00
Brad King
16327086f0 Merge topic 'file-GET_RUNTIME_DEPENDENCIES-terms' into release-3.18
2b60088d14 Help: Update file(GET_RUNTIME_DEPENDENCIES) prose to match option names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5053
2020-07-23 14:11:52 -04:00
Brad King
2b60088d14 Help: Update file(GET_RUNTIME_DEPENDENCIES) prose to match option names 2020-07-23 13:47:24 -04:00
Brad King
26673bf480 Xcode: Explicitly specify default native architecture on macOS
When `CMAKE_OSX_ARCHITECTURES` is not specified, we add the Xcode
setting `ONLY_ACTIVE_ARCH = YES` with the intention of targeting the
native architecture of the host.  However, the default `ARCHS` value
chosen by "Xcode 12 Universal Apps" includes multiple architectures.
Add an explicit `ARCHS` setting with value `$(NATIVE_ARCH_ACTUAL)`
to tell Xcode to use the host's native architecture only.

Fixes: #20893
2020-07-20 10:03:15 -04:00
Brad King
6b845e9066 Merge topic 'doc-find_package' into release-3.18
cc92a4c228 Help: Fix typo in find_package documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5014
2020-07-15 06:46:21 -04:00
Kai Koehne
cc92a4c228 Help: Fix typo in find_package documentation 2020-07-15 06:44:33 -04:00
Craig Scott
0bdb1a77d1 Help: Clarify wording of dir-related source property options 2020-07-13 10:06:52 +10:00
Alexandru Croitor
961ee62faa Help: Update get_property and get_source_file_property docs
Specify the names and alternatives a bit more clearly.
2020-07-09 06:35:06 -04:00
Alexandru Croitor
1235f2d747 set_property: Allow both DIRECTORY and TARGET_DIRECTORY together
Allow to specify both DIRECTORY and TARGET_DIRECTORY at the same time in
`set_source_files_properties()` and `set_property(SOURCE)` commands.

Add test cases and update the documentation.

Fixes: #20932
2020-07-09 06:33:52 -04:00
Kyle Edwards
c57695a2f4 Help: Clarify search order for resource spec file
Clarify the order in which --resource-spec-file, RESOURCE_SPEC_FILE,
and CTEST_RESOURCE_SPEC_FILE are searched, and add tests to
enforce this.

Fixes: #20914
2020-07-07 12:21:58 -04:00
Craig Scott
f9766dad19 Help: Update file(ARCHIVE...) synopsis for renamed options
The FILES and DIRECTORY options were renamed in bbcff21f71
(file(ARCHIVE*): Collapse FILES and DIRECTORY options, 2020-06-30), 
but the synopsis part of the file() documentation was missed.
The synopsis also typically only shows the mandatory options.
Update the synopsis to reflect the name changes and omit the
DESTINATION option since it is not mandatory.
2020-07-06 20:15:09 +10:00
Craig Scott
3bb287581c Help: FRAMEWORK_MULTI_CONFIG_POSTFIX example should use actual config 2020-07-05 16:26:46 +10:00
Brad King
0ca6bb8575 Merge topic 'file-ARCHIVE-files-dirs' into release-3.18
bbcff21f71 file(ARCHIVE*): Collapse FILES and DIRECTORY options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4955
2020-07-01 07:00:42 -04:00
Kyle Edwards
e9be17ab42 Help: Update FileAPI codemodel version to 2.1, add release notes
This fixes the documentation which should have been fixed in 9f6d40ee.
2020-06-30 14:04:13 -04:00
Brad King
221fd89251 Merge topic 'file-CONFIGURE-subdir' into release-3.18
e5f5eeca2f file: Fix CONFIGURE output relative path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4951
2020-06-30 08:04:07 -04:00
Craig Scott
bbcff21f71 file(ARCHIVE*): Collapse FILES and DIRECTORY options
The two options were concatenated internally for both ARCHIVE_CREATE
and ARCHIVE_EXTRACT. The distinction between files and dirs was not
meaningful. Therefore, replace them with PATHS or PATTERNS 
to more accurately describe the way the options are used.

Fixes: #20884
2020-06-30 22:01:35 +10:00
Brad King
e5f5eeca2f file: Fix CONFIGURE output relative path
In commit a6fee09484 (file: Add CONFIGURE subcommand, 2020-03-06,
v3.18.0-rc1~584^2) we accidentally treated relative path outputs
with respect to the current working directory.  Treat them with
respect to the current binary directory instead.

Fixes: #20885
2020-06-29 09:20:42 -04:00
Craig Scott
95159b7dea file(ARCHIVE_CREATE): Rename TYPE option to COMPRESSION
Fixes: #20883
2020-06-27 18:38:28 +10:00
Craig Scott
bc45bdc819 Help: Fix contents indenting for file(ARCHIVE_...) subcommands 2020-06-27 16:33:29 +10:00
Craig Scott
1458b4c048 Help: Add CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE to release notes 2020-06-24 23:19:06 +10:00
Brad King
1f47a65c7a Merge topic 'doc-get_target_property' into release-3.18
f4b911a2c9 Help: Update docs for failure result of get_target_property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4933
2020-06-23 08:50:54 -04:00
Christopher Tetreault
f4b911a2c9 Help: Update docs for failure result of get_target_property
If `get_target_property` fails to find a value for a non-inherited
property, it appends `-NOTFOUND` to the var name and sets that as the
result, rather than setting the value of the var to `NOTFOUND`.
2020-06-23 08:17:59 -04:00
Brad King
c26853718e Merge topic 'improve_device_link_policy_cross_ref' into release-3.18
e5279c2c8f Help: Better document that CMP0105 controls DEVICE_LINK parsing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4919
2020-06-18 12:45:27 -04:00
Robert Maynard
e5279c2c8f Help: Better document that CMP0105 controls DEVICE_LINK parsing 2020-06-18 12:07:26 -04:00
Craig Scott
947cfc732d Help: Explicitly say transaction, don't abbreviate to trans
The release notes need to make sense to people not so familiar with
each item. For those less familiar with RPM, spelling out "transaction"
makes this line item much clearer in isolation.
2020-06-18 20:43:46 +10:00
Craig Scott
90c73479bc Help: Correct and condense examples for VS_SOLUTION_DEPLOY 2020-06-18 20:43:46 +10:00
Craig Scott
0420de10b5 Help: Add missing cross-referencing for generator expressions 2020-06-18 20:43:46 +10:00
Craig Scott
013f7a2647 Help: Formatting, crossref for FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG> 2020-06-18 20:43:46 +10:00
Craig Scott
a12d53acf3 Help: Add missing PCH_WARN_INVALID docs and related cleanups 2020-06-18 20:26:03 +10:00
Brad King
4f6ce41446 Help: Fix order of FindCUDAToolkit entry in 3.18 release notes 2020-06-17 11:28:31 -04:00
Raul Tambre
bdb105ee94 Help: Mention CUDA Clang limitations in 3.18 release notes 2020-06-16 14:07:39 -04:00
Brad King
7fa5ea130b Merge topic 'cuda_clang_toolkit_path' into release-3.18
ec59fb6c31 CUDA: Determine CUDA toolkit location for NVCC
0a056246a1 CUDA: Pass toolkit path to Clang
9c43972127 FindCUDAToolkit: Avoid unnecessary temporary variable computing binary dir
9eebb5b8b2 FindCUDAToolkit: Remove unnecessary checks around searches
8f01fe7bf1 FindCUDAToolkit: Use list(SORT) to sort in natural order
8c144fe9ad FindCUDAToolkit: Compute CUDAToolkit_INCLUDE_DIR instead of searching
403f8d31e3 FindCUDAToolkit: Add CUDAToolkit_LIBRARY_ROOT
6636693134 FindCUDAToolkit: Re-unify with Internal/CUDAToolkit

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4828
2020-06-15 09:25:29 -04:00
Raul Tambre
877a92e968 CUDA: Add support for disabling CUDA_ARCHITECTURES
The ability to disable adding architectures completely for packaging purposes
and cases requiring passing the architectures flags explicitly has been
requested.
Support a false value for CUDA_ARCHITECTURES and CMAKE_CUDA_ARCHITECTURES
for this purpose.

Implements #20821.
2020-06-15 09:13:32 -04:00
Raul Tambre
ec59fb6c31 CUDA: Determine CUDA toolkit location for NVCC
Similar to how we already do for Clang. Avoids a lot of redundant work in
FindCUDAToolkit.
2020-06-12 23:13:57 +03:00
Raul Tambre
403f8d31e3 FindCUDAToolkit: Add CUDAToolkit_LIBRARY_ROOT
On scattered installations version.txt and nvvm are located at this location.
This may be useful to users and will allow us in the future to parse
version.txt instead of invoking nvcc to figure out the CUDA toolkit version.

We also add it to CMakeDetermineCUDACompiler in preparation for future use by
Clang code.
2020-06-12 21:49:15 +03:00
Ben Boeckel
131b8cc8ae Help/dev: document other arguments to Do: test 2020-06-09 11:12:05 -04:00
Craig Scott
b5d8e93732 Merge topic 'doc-gitlab-ci' into release-3.18
855ed80111 Help/dev: Update CMake Review Process document for GitLab CI

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4865
2020-06-09 07:59:45 -04:00
Brad King
855ed80111 Help/dev: Update CMake Review Process document for GitLab CI
We have replaced use of `buildbot` with GitLab CI.  Update the
relevant section of our review process documentation.
2020-06-09 07:54:22 -04:00
Michael Hirsch
6b75175219 Help: Add example for REQUIRED_FILES test property 2020-06-09 09:20:23 +10:00
Michael Hirsch
61139c91d2 Help: Add example for DEPENDS test property 2020-06-09 09:04:04 +10:00
Brad King
47a47f5ce0 Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2020-06-05 08:33:59 -04:00
Brad King
7cf278da55 Merge topic 'doc-3.18-relnotes'
389ca18289 Help: Organize and revise 3.18 release notes
ab6b5c01ea Help: Consolidate 3.18 release notes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4845
2020-06-05 08:22:18 -04:00
Brad King
35a192788f Merge topic 'doc-EXCLUDE_FROM_ALL'
e262123fee Help: Clarify the effect of EXCLUDE_FROM_ALL on target installation
a09195e7bf Help: Rename 'artefact' to 'artifact' in target_precompile_headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4840
2020-06-03 07:48:13 -04:00
Brad King
389ca18289 Help: Organize and revise 3.18 release notes
Add section headers similar to the 3.18 release notes and move each
individual bullet into an appropriate section.  Revise a few bullets.
2020-06-03 06:22:15 -04:00
Brad King
ab6b5c01ea Help: Consolidate 3.18 release notes
Run the `Utilities/Release/consolidate-relnotes.bash` script to move
notes from `Help/release/dev/*` into `Help/release/3.18.rst`.
2020-06-03 06:17:54 -04:00
Arcturus
e262123fee Help: Clarify the effect of EXCLUDE_FROM_ALL on target installation 2020-06-02 13:29:08 -04:00
Arcturus
a09195e7bf Help: Rename 'artefact' to 'artifact' in target_precompile_headers 2020-06-02 13:26:38 -04:00