5052 Commits

Author SHA1 Message Date
w00657280 c8bc56b0c6 fix:update cmake to 3.28.2
Signed-off-by: w00657280 <wuyuechang3@huawei.com>
2024-06-06 10:57:34 +08:00
Brad King ec120d82c7 Help: Add 3.20 release note section for 3.20.{3,4,5}
Make it clear that the notes for these patch releases were not
forgotten, and that there were simply no changes to documented features
or interfaces.
2021-06-21 11:20:33 -04:00
Marc Chevrier 9eb382858b Help: cmake_path: fix erroneous example for IS_PREFIX 2021-06-12 11:22:40 +02:00
Brad King c1acf24822 Help: Use relative path for IDE Integration guide link to preset schema
This allows the integration guide to build as part of a larger set of
documentation.
2021-05-03 15:36:45 -04:00
Brad King 0df4db06cc IntelLLVM: Add special case for ifx 2021.1 version extraction
The ifx beta versions forgot to define `__INTEL_LLVM_COMPILER`, and
instead define `__INTEL_COMPILER == 201900`.  Add a special case.

Issue: #22120
2021-04-28 10:21:27 -04:00
Brad King d130b90122 Intel: Update Classic compiler version detection for 2021
The value of the `__INTEL_COMPILER` macro changed convention starting
in version 2021.

Fixes: #22120
2021-04-28 10:20:59 -04:00
Brad King 2a88bcf752 Help: Do not recommend WCDH in cmake-compile-features(7)
Since commit 2ce59be784 (WriteCompilerDetectionHeader: Add policy to
remove module, 2020-12-04, v3.20.0-rc1~350^2), the WCDH module is
deprecated.  Update the `cmake-compile-features(7)` manual section that
previously recommended WCDH to make such detection the project's
responsibility instead.  Move the old content of the section over to the
WCDH module to preserve it.
2021-04-23 10:44:53 -04:00
Brad King a90f599f1e Help: Fix typos in cmake-compile-features(7) 2021-04-23 10:44:01 -04:00
Brad King b7744b5c87 Merge topic 'doc-if-IS_ABSOLUTE' into release-3.20
21c6e4566c Help: Document special cases for if(IS_ABSOLUTE)
6b0fe6c283 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:51 -04:00
Craig Scott 21c6e4566c 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 6b0fe6c283 Help: Behavior of file(TO_NATIVE_PATH) depends on the host platform 2021-04-17 19:41:53 +10:00
Brad King 69920fbf3e Help: Add 3.20 release note for error on unknown arguments
This was left out of commit e1fcb36b03 (cmake: Error out on unknown
arguments starting with `-`., 2020-11-30, v3.20.0-rc1~370^2).

Fixes: #22060
2021-04-14 11:46:05 -04:00
Brad King 01e5649a79 Merge topic 'ios-rpath-linker-flag' into release-3.20
5e9f654e17 Apple: Set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG on non-macOS too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5980
2021-04-07 10:06:55 -04:00
Brad King 531bcdef8e Merge topic 'add_q_namespace_export_docs' into release-3.20
4f391c6512 Help: Add Q_NAMESPACE_EXPORT to CMAKE_AUTOMOC_MACRO_NAMES default values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5982
2021-04-06 08:27:15 -04:00
Craig Scott 5e9f654e17 Apple: Set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG on non-macOS too
Since CMake 3.19, we no longer support macOS SDKs older than 10.5,
which corresponds to Xcode 3. Supporting older Xcode versions for
device platforms is also not realistic. We therefore expect the -rpath
linker option should always be supported now.

When targeting iOS, tvOS or watchOS, the previous disabling of -rpath
support meant that the install_name_dir of shared libraries and
frameworks was unable to use @rpath. This resulted in embedding
absolute paths for their install_name. When they were embedded in an
app bundle, this would cause the app to fail at runtime. By enabling the
-rpath linker option, the default install_name_dir is now @rpath for these platforms, which results in binaries that do work at runtime.

Fixes: #20036
2021-04-06 11:46:56 +10:00
Alexander Neumann 4f391c6512 Help: Add Q_NAMESPACE_EXPORT to CMAKE_AUTOMOC_MACRO_NAMES default values
This was accidentally left out of commit e9af7fc19d (Autogen: Recognize
the new Q_NAMESPACE_EXPORT macro in AUTOMOC, 2020-02-26,
v3.17.0-rc2~3^2).
2021-04-05 11:25:19 -04:00
Brad King 22cbd1afd8 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
mcc 97bbf3e9a8 Help: Clarify IMPORTED_LOCATION documentation
Prefer the macOS term "application bundle" over just "bundle".
Put both macOS cases together.
2021-04-01 13:40:44 -04:00
Brad King de91ce6733 Merge topic 'doc-CMAKE_APPLE_SILICON_PROCESSOR' into release-3.20
cf48bb4c87 Help: CMAKE_APPLE_SILICON_PROCESSOR cannot be set in a toolchain file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5965
2021-04-01 10:23:13 -04:00
Brad King cf48bb4c87 Help: CMAKE_APPLE_SILICON_PROCESSOR cannot be set in a toolchain file
`CMakeDetermineSystem` determines the host system information before
loading the toolchain file.

Issue: #22012
2021-04-01 10:04:05 -04:00
Brad King ecd979522b Merge topic 'commands-file-permissions' into release-3.20
60aab21f3a Help: Clarify permission-related command options
0327077b3c Cleanup: Fix misspelt name of local C++ variable
82f732a84a Tests: Check host platform instead of target for running stat
7b335e40a5 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 60aab21f3a 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
Brad King 4b34b28328 FindIntl: Fix detection of intl built in to C library
Since commit b5326fea7c (FindIntl: Add imported target, 2020-10-06,
v3.20.0-rc1~687^2) we use `check_symbol_exists` to check whether the
`intl` library is built in to the C library.  On some platforms the
tested symbols are provided as macros so the check passes without
linking any symbol.  Instead, check whether a sample source file both
compiles and links.

Fixes: #21979
2021-03-26 11:01:34 -04:00
Brad King 926dea2c9f Merge topic 'doc-custom-output-genex' into release-3.20
2c0f9e4fcd 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:37 -04:00
Craig Scott 2c0f9e4fcd Help: Custom OUTPUT and BYPRODUCTS genexes cannot refer to targets
Relates: #21364
2021-03-25 18:04:17 +11:00
Craig Scott 9c9140e8de CPack: Validate and document NSIS branding text trim positions 2021-03-24 16:35:29 +11:00
Craig Scott 5568071e70 Help: CMAKE_NO_BUILTIN_CHRPATH applies to XCOFF too 2021-03-22 11:48:01 -04:00
Brad King b51b357b7e Merge topic 'schema-typo' into release-3.20
14cb16da80 Help: Fix typos in presets schema field descriptions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5922
2021-03-19 11:18:22 -04:00
Adriaan de Groot 14cb16da80 Help: Fix typos in presets schema field descriptions 2021-03-18 10:07:09 -04:00
Brad King c03c35fc71 Help: Document CMP0118 requirement for boolean values 2021-03-18 10:00:02 -04:00
Brad King 003d9e391d Merge topic 'vs-toolset-version' into release-3.20
0fb7c85188 VS: Accept and translate '-T version=' values with three components
b3b9e17c84 VS: Fix '-T version=14.28' under VS 16.9
d44cd09a06 cmGlobalVisualStudioVersionedGenerator: Clarify local variable name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5903
2021-03-15 08:50:13 -04:00
Brad King 0fb7c85188 VS: Accept and translate '-T version=' values with three components
The VS 16.8 and VS 16.9 toolset versions differ only in their third
component.  The `vcvarsall` option `-vcvars_ver=` accepts a three
component version, so accept this format for VS toolset selection too.

Issue: #21922
2021-03-12 08:36:45 -05:00
Brad King b3b9e17c84 VS: Fix '-T version=14.28' under VS 16.9
CMake accepts the toolset version that is default in the current VS
version by matching the name later VS versions will use for the SxS
props files.  It predicts the future name based on the first two
components of the current VS version's default toolset.  However, this
heuristic breaks naming the VS 16.8 toolset version 14.28 under VS 16.9
because the latter's default toolset version is 14.28.29910, which did
not increment the second version component (unprecedented in VS).

Fix this by always using the requested version's SxS props file when it
exists, even if it matches the first two components of the current VS
version's default toolset.  Also add a special case for the name VS
16.10 will use for VS 16.9's default toolset, so that it can be used
with VS 16.9 too.

Fixes: #21922
2021-03-12 08:36:40 -05:00
Craig Scott e1a67ccad6 Revert ExternalProject and FetchContent refactoring
Refactoring of the ExternalProject and FetchContent modules moved
the commands into CMake scripts. This broke custom commands that
used shell redirection or special build tool variables of the form
$(MakeVar). Undo the sequence of commits that performed this
refactoring and follow-up fixes associated with it.

The following commits are reverted by this change:

fa44987386 (ExternalProject: Refactor pre-configure steps to support
no-target uses, 2021-02-05)

620b83aba0 (FetchContent: Invoke steps directly and avoid a separate
sub-build, 2021-01-29)

9ed24c400c (FetchContent: Restore patch command support,
2021-02-18)

450eb8f40b (ExternalProject: Fix misuse of IS_NEWER_THAN in
timestamp checks, 2021-02-21)

963ff39ea6 (FetchContent: Don't update timestamps if files don't
change, 2021-02-18)

Fixes: #21892
2021-03-10 09:07:44 +11:00
Brad King 006b5c0a6c Merge topic 'android-r22' into release-3.20
f608fc639c Android: Do not use gold for ndk >= r22
62263ec926 Tests: Update RunCMake.Android for NDK r22
4a123f1f03 Help: Document CMAKE_ANDROID_NDK_VERSION variable
ff66276f47 Android: Detect NDK version number

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5862
2021-03-03 11:11:58 -05:00
Brad King 4a123f1f03 Help: Document CMAKE_ANDROID_NDK_VERSION variable 2021-03-03 10:27:50 -05:00
Ben Boeckel 77a8a5694f Help/guide: fix the remaining CMake install destinations
Followup from !5674.
2021-03-01 11:05:14 -05:00
Robert Maynard 1d16dd5af9 HELP: Update compile-features documentation with missing compilers 2021-02-24 13:09:59 -05:00
Brad King f158efcc82 Merge topic 'preset-flag-consistency' into release-3.20
8312a2424e ctest: Add support for '--prefix=<prefix>' form of the argument
0ffca26438 cmake: Add support for '--build --prefix=<prefix>' form of the argument
3c4679c1d8 cmake: Document '--preset <preset>' form of the argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5849
2021-02-24 09:46:52 -05:00
Brad King 99e7452eba Merge topic 'autogen-cmp0116-fix' into release-3.20
f2b277346e Help: Note that CMP0116 is recorded at the time of CC creation
0168c75b61 Tests: Test Qt autogen target with CMP0116 set to WARN
35f585a4b7 Tests: Test per-CC behavior of CMP0116
fe81eb5680 Ninja: Use CMP0116 status recorded at time of custom command's creation
e65bfd6926 cmCustomCommand: Record value of CMP0116 at time of creation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5848
2021-02-24 09:44:59 -05:00
Brad King fe60dfa8ec Merge branch 'backport-3.19-preset-no-comments' into preset-no-comments 2021-02-24 09:33:59 -05:00
Kyle Edwards 8184bfd20c Revert "Help: Document JSON comment support in cmake-presets(7)"
Revert commit f8f0649df1 (Help: Document JSON comment support in
cmake-presets(7), 2021-02-18).  The support for comments was a mistake
when the feature was implemented in 3.19, and is being removed.
2021-02-24 09:33:50 -05:00
Kyle Edwards d6e667b8a5 CMakePresets.json: Remove undocumented support for comments
Fixes: #21858
2021-02-24 09:28:36 -05:00
Brad King 8312a2424e ctest: Add support for '--prefix=<prefix>' form of the argument
The main `cmake --preset` argument for configure presets supports both
forms, so support it for `ctest --preset` too.

Fixes: #21855
2021-02-23 09:22:00 -05:00
Kyle Edwards f2b277346e Help: Note that CMP0116 is recorded at the time of CC creation 2021-02-23 09:17:12 -05:00
Brad King 0ffca26438 cmake: Add support for '--build --prefix=<prefix>' form of the argument
The main `cmake --preset` argument for configure presets supports both
forms, so support it for `cmake --build --preset` too.

Issue: #21855
2021-02-23 09:11:44 -05:00
Brad King 3c4679c1d8 cmake: Document '--preset <preset>' form of the argument
This form already works.  Document it and add tests.

Issue: #21855
2021-02-23 09:11:32 -05:00
Brad King abefe0e55a Merge topic 'doc-cpack-dpkg-shlibdeps-l' into release-3.20
a5f3057dd4 Help: Fix CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5835
2021-02-22 10:38:00 -05:00
Brad King c548c0ae47 Merge topic 'docpreset' into release-3.20
d8fcc13693 Help: Add build and test preset to examples in cmake-presets(7)
131a7b0476 Help: Clarify preset name conflict rules in cmake-presets(7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5823
2021-02-19 09:34:35 -05:00
Brad King a5f3057dd4 Help: Fix CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS documentation
The docs added by commit 7c65480a60 (CPackDeb: dpkg-shlibdeps now
supports searching for private shared libs, 2021-01-19,
v3.20.0-rc1~115^2) specify the `-d` option, but the implementation
actually uses the `-l` option.

Issue: #21838
2021-02-19 09:14:14 -05:00