Commit Graph

5070 Commits

Author SHA1 Message Date
Brad King
3cea13c2f3 Merge topic 'cmake-presets-host-system-name'
0d497e159b CMakePresets.json: Add ${hostSystemName} macro
79d03ab505 Help: Fix version numbers in CMakePresets.json documentation
69527a1979 Refactor: Pass CMakePresets.json version to ExpandMacros() functions
ad19da011d Refactor: Add cmSystemTools::GetSystemName()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5902
2021-03-16 10:51:32 -04:00
Brad King
84f94fb196 Merge topic 'doc-configure_file-cmakedefine01'
c13f75982f Help: Clarify configure_file #cmakedefine01 syntax and behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Michael Hirsch <michael@scivision.dev>
Merge-request: !5909
2021-03-16 10:50:00 -04:00
Kyle Edwards
0d497e159b CMakePresets.json: Add ${hostSystemName} macro 2021-03-15 14:41:42 -04:00
Kyle Edwards
79d03ab505 Help: Fix version numbers in CMakePresets.json documentation 2021-03-15 14:41:42 -04:00
Kyle Edwards
ad19da011d Refactor: Add cmSystemTools::GetSystemName()
And use it for CMAKE_HOST_SYSTEM_NAME and CMAKE_SYSTEM_NAME.
2021-03-15 14:41:42 -04:00
Elsie Hupp
c13f75982f Help: Clarify configure_file #cmakedefine01 syntax and behavior
Fixes: #21935
2021-03-15 09:15:08 -04:00
Brad King
3d661c6c3a Merge topic 'vs-toolset-version'
30c835428f VS: Accept and translate '-T version=' values with three components
58a50a3a0a VS: Fix '-T version=14.28' under VS 16.9
09f59da7f0 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
30c835428f 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
58a50a3a0a 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
Brad King
9a80ce6d24 Merge topic 'add_prefix_cmake_option'
400536c317 cmCommandLineArgument: trim leading empty spaces
b227a9565e cmake: configure preset add support for --install-prefix mapping
38140713ad cmake: add support for --install-prefix command argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5843
2021-03-11 08:16:03 -05:00
Brad King
00eb4df37e Merge topic 'file-COPY_FILE-subcommand'
088444211e file: add `COPY_FILE` subcommand
100016e9cb cmSystemTools: add utilities to copy a file with error handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5885
2021-03-11 08:13:29 -05:00
Brad King
03193a9e9a Merge topic 'ep-fc-revert-refactoring'
57d442e182 Revert ExternalProject and FetchContent refactoring

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5898
2021-03-10 11:37:15 -05: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
Craig Scott
57d442e182 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:

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

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

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

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

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

Fixes: #21892
2021-03-10 09:07:44 +11:00
Robert Maynard
b227a9565e cmake: configure preset add support for --install-prefix mapping 2021-03-09 13:53:16 -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
Robert Maynard
38140713ad cmake: add support for --install-prefix command argument
Fixes: #21781
2021-03-04 10:50:24 -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
Brad King
ef3d1ebda8 Merge topic 'android-r22' into release-3.20
005e2cdfb0 Android: Do not use gold for ndk >= r22
ed7a87f270 Tests: Update RunCMake.Android for NDK r22
4950d35733 Help: Document CMAKE_ANDROID_NDK_VERSION variable
746906242d 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
957a117c70 Merge topic 'android-r22'
005e2cdfb0 Android: Do not use gold for ndk >= r22
ed7a87f270 Tests: Update RunCMake.Android for NDK r22
4950d35733 Help: Document CMAKE_ANDROID_NDK_VERSION variable
746906242d 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
4950d35733 Help: Document CMAKE_ANDROID_NDK_VERSION variable 2021-03-03 10:27:50 -05:00
Brad King
a88efbc9cf Merge topic 'cpack-dmg-filesystem'
e3ac388738 cpack: add CPACK_DMG_FILESYSTEM

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5873
2021-03-03 09:07:29 -05:00
Kevin Ushey
e3ac388738 cpack: add CPACK_DMG_FILESYSTEM
Allow users to configure the filesystem format of the generated `.dmg`
via the `CPACK_DMG_FILESYSTEM` option.

Fixes: #21874
2021-03-02 10:11:15 -05:00
Brad King
4a8c8be4dd Merge topic 'more-import-export-guide-updates'
74c2ade187 Help/guide: fix the remaining CMake install destinations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5870
2021-03-02 08:45:14 -05:00
Brad King
7a10aa922d Merge topic 'FindIntl-FindIconv-versions'
a9b11a06f5 FindIntl: Add version support
01e9922db5 FindIconv: Add version support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5852
2021-03-01 14:55:10 -05:00
Ben Boeckel
74c2ade187 Help/guide: fix the remaining CMake install destinations
Followup from !5674.
2021-03-01 11:05:14 -05:00
Raul Tambre
dcd599757f C23 support 2021-02-25 18:22:10 +02:00
Raul Tambre
93b7d3d292 C17 support
Implements #17755.
2021-02-25 18:22:10 +02:00
Brad King
a5678e46f8 Merge topic 'runtime-dll-deps'
f31e8d33ef Genex: Fix grammatical error in TARGET_OBJECTS error message
d34d28e688 Genex: Add TARGET_RUNTIME_DLLS genex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5837
2021-02-25 09:58:40 -05:00
Sibi Siddharthan
a9b11a06f5 FindIntl: Add version support
Additional Changes: Rework the documentation of FindIntl

NOTES:
Reorder the REQUIRED_VARS arguments so find_package reports the library
instead of the include directory.
Handle Intl_LIBRARY in the same way how FindIconv handles it in case of glibc.
If the VERSION_VAR argument is an empty string nothing happens.

Fixes: #21857
2021-02-25 20:18:56 +05:30
Sibi Siddharthan
01e9922db5 FindIconv: Add version support
Issue: #21857
2021-02-25 20:18:55 +05:30
Brad King
6288974ba5 Merge topic 'nvhpc-minor-fixes'
72efd95add PGI: Explicitly specify CMAKE_CXX98_STANDARD_COMPILE_OPTION
6bfb2c6175 HELP: Update compile-features documentation with missing compilers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5857
2021-02-25 09:02:02 -05:00
Kyle Edwards
d34d28e688 Genex: Add TARGET_RUNTIME_DLLS genex
Co-Authored-by: Brad King <brad.king@kitware.com>
2021-02-24 14:55:17 -05:00
Robert Maynard
6bfb2c6175 HELP: Update compile-features documentation with missing compilers 2021-02-24 13:09:59 -05:00
Brad King
e95f7aa0ed Merge topic 'preset-flag-consistency' into release-3.20
6fa3647023 ctest: Add support for '--prefix=<prefix>' form of the argument
3357d37761 cmake: Add support for '--build --prefix=<prefix>' form of the argument
2f13fdef0a 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
414cfc6ecb Merge topic 'preset-flag-consistency'
6fa3647023 ctest: Add support for '--prefix=<prefix>' form of the argument
3357d37761 cmake: Add support for '--build --prefix=<prefix>' form of the argument
2f13fdef0a 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
261ba00668 Merge topic 'autogen-cmp0116-fix' into release-3.20
339dbc901f Help: Note that CMP0116 is recorded at the time of CC creation
e3740e020e Tests: Test Qt autogen target with CMP0116 set to WARN
cf34011ce7 Tests: Test per-CC behavior of CMP0116
3a95503512 Ninja: Use CMP0116 status recorded at time of custom command's creation
f01f10e8fb 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
ab3485d15b Merge topic 'autogen-cmp0116-fix'
339dbc901f Help: Note that CMP0116 is recorded at the time of CC creation
e3740e020e Tests: Test Qt autogen target with CMP0116 set to WARN
cf34011ce7 Tests: Test per-CC behavior of CMP0116
3a95503512 Ninja: Use CMP0116 status recorded at time of custom command's creation
f01f10e8fb 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
bf0fd71ad1 Merge topic 'preset-no-comments'
06e16ea008 Merge branch 'backport-3.19-preset-no-comments' into preset-no-comments
afaa69f5b3 Tests: Remove comments from CMakePresetsTest/Good.json.in
4a92277f45 Revert "Help: Document JSON comment support in cmake-presets(7)"
431dd59b5e CMakePresets.json: Remove undocumented support for comments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5853
2021-02-24 09:42:00 -05:00
Brad King
06e16ea008 Merge branch 'backport-3.19-preset-no-comments' into preset-no-comments 2021-02-24 09:33:59 -05:00
Kyle Edwards
4a92277f45 Revert "Help: Document JSON comment support in cmake-presets(7)"
Revert commit 8f1e607ed9 (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
431dd59b5e CMakePresets.json: Remove undocumented support for comments
Fixes: #21858
2021-02-24 09:28:36 -05:00
Brad King
6fa3647023 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
339dbc901f Help: Note that CMP0116 is recorded at the time of CC creation 2021-02-23 09:17:12 -05:00
Brad King
3357d37761 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
2f13fdef0a 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
ec5f76753a Merge topic 'cpack_nsis_executable_custom'
8e8b99d01a CPack/NSIS: Add option for setting custom makensis executable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5839
2021-02-23 08:11:05 -05:00
Johnny Jazeix
8e8b99d01a CPack/NSIS: Add option for setting custom makensis executable
It allows users to set a custom one without changing the PATH environment variable.

Fixes: #21733
2021-02-22 17:59:04 +01:00
Brad King
b2b73ff713 Merge topic 'doc-cpack-dpkg-shlibdeps-l' into release-3.20
cf9a71870b 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