Commit Graph

5098 Commits

Author SHA1 Message Date
Brad King
0310097377 Merge topic 'vs-custom-flag-table'
608ef8a6fc VS: Add a mostly-undocumented hook to load custom JSON flag tables
8dd8d63665 Tests: Add RunCMake hook to describe test variants

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5895
2021-03-23 11:20:18 -04:00
Brad King
08e3961f80 Merge topic 'doc-xcoff-chrpath'
4a9fb82030 Help: CMAKE_NO_BUILTIN_CHRPATH applies to XCOFF too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5925
2021-03-23 10:34:50 -04:00
Brad King
928f4bda30 Merge topic 'cmake-presets-condition'
8bc5c8961e CMakePresets.json: Add the ability to conditionally disable presets
ce6ea7c927 Refactor: Move some common code into separate file
ebbd475e54 Refactor: Move cmCMakePresetsFile::ReadJSON into a separate file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5919
2021-03-23 10:33:59 -04:00
Brad King
a740e8b311 Merge topic 'cxx-module-extensions'
7c4c4f1406 Treat '.ixx' and '.cppm' files as C++ sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5926
2021-03-23 10:33:03 -04:00
Kyle Edwards
8bc5c8961e CMakePresets.json: Add the ability to conditionally disable presets 2021-03-22 15:04:54 -04:00
Brad King
608ef8a6fc VS: Add a mostly-undocumented hook to load custom JSON flag tables
The names and formats of our VS flag tables are internal implementation
details.  However, some institutions need to maintain support for
non-public VS platforms and toolsets.  Provide a hook that their
projects can use to load custom flag table files.  This helps avoid
distributing a custom CMake package within such institutions.

Document the hook itself, but explicitly specify that the files the
hook loads are not considered a stable interface.
2021-03-22 13:28:27 -04:00
Andrew Gilewsky
7c4c4f1406 Treat '.ixx' and '.cppm' files as C++ sources
These extensions are used by convention for C++ modules and interface
units with MSVC.
2021-03-22 11:58:44 -04:00
Craig Scott
4a9fb82030 Help: CMAKE_NO_BUILTIN_CHRPATH applies to XCOFF too 2021-03-22 11:48:01 -04:00
Ben Boeckel
26cf661b64 Help/guide: use GNUInstallDirs in importing-exporting example
This allows the example to also show how to work on systems with
different libdir settings (e.g., Debian multiarch or Red Hat multilib)
rather than a regular `lib` directory.
2021-03-19 14:23:26 -04:00
Brad King
888c1cb276 Merge topic 'update_cuda_custom_toolkit_location_folder_structure'
c73b847b03 VS: switch to new folder structure while keeping the old one working

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5911
2021-03-19 11:26:20 -04:00
Brad King
8cef887b8a Merge topic 'FindDevIL-targets'
73b27f6ae8 FindDevIL: add imported targets and tests
52d3d1bdc5 FindDevIL: Format documentation of provided variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5891
2021-03-19 11:20:10 -04:00
Brad King
3d9aa96fca Merge topic 'schema-typo' into release-3.20
bda6446e6f 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
Brad King
4acccc8b68 Merge topic 'schema-typo'
fae7910268 Help: Fix typos in presets schema field descriptions
fa1b729b9d Merge branch 'backport-preset-schema-typos' into preset-schema-typos
bda6446e6f 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
Brad King
8ebd5521f7 Merge topic 'fix-CMP0118-NEW'
17eb610a31 Help: Document CMP0118 requirement for boolean values
06feb845aa CMP0118: Fix NEW behavior when looking up target sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5921
2021-03-19 11:17:20 -04:00
Marcel Ritzschke
c73b847b03 VS: switch to new folder structure while keeping the old one working
Fixes: #21170
2021-03-18 15:44:13 +01:00
Alex
73b27f6ae8 FindDevIL: add imported targets and tests
Fixes: #21900
2021-03-18 10:42:02 -04:00
Adriaan de Groot
fae7910268 Help: Fix typos in presets schema field descriptions 2021-03-18 10:09:44 -04:00
Brad King
fa1b729b9d Merge branch 'backport-preset-schema-typos' into preset-schema-typos 2021-03-18 10:09:19 -04:00
Adriaan de Groot
bda6446e6f Help: Fix typos in presets schema field descriptions 2021-03-18 10:07:09 -04:00
Brad King
17eb610a31 Help: Document CMP0118 requirement for boolean values 2021-03-18 10:00:02 -04:00
Brad King
f3d9cedc8b Merge topic 'fileapi-codemodel-directory'
049bf98f63 fileapi: Add installers to codemodel-v2 "directory" object
eae2256a52 fileapi: Add backtraceGraph to codemodel-v2 "directory" object
a12d7f70b1 fileapi: Add a "directory" object to codemodel-v2
fd30bd93e6 fileapi: Re-organize backtrace infrastructure
415ead8153 cmFileAPICodemodel: Build map from each target to its index
f73b6879e9 cmInstallTargetGenerator: Report namelink mode with list of files
ea430582f9 cmInstallTargetGenerator: Drop unused GetNamelinkMode method

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5917
2021-03-18 09:41:59 -04:00
Brad King
649976e9a6 Merge topic 'doc-flag-var-strings'
95c50da8af Help: Document that CMAKE_<LANG>_FLAGS[_INIT] are strings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5915
2021-03-17 09:24:04 -04:00
Alexander Richardson
95c50da8af Help: Document that CMAKE_<LANG>_FLAGS[_INIT] are strings
Issue: #21944
2021-03-17 09:22:52 -04:00
Brad King
049bf98f63 fileapi: Add installers to codemodel-v2 "directory" object
Co-Authored-by: Kyle Edwards <kyle.edwards@kitware.com>
2021-03-16 16:47:57 -04:00
Brad King
eae2256a52 fileapi: Add backtraceGraph to codemodel-v2 "directory" object
Co-Authored-by: Kyle Edwards <kyle.edwards@kitware.com>
2021-03-16 16:47:55 -04:00
Brad King
a12d7f70b1 fileapi: Add a "directory" object to codemodel-v2
This object will contain more detailed directory-level information.

Co-Authored-by: Kyle Edwards <kyle.edwards@kitware.com>
2021-03-16 16:47:43 -04:00
Brad King
fd30bd93e6 fileapi: Re-organize backtrace infrastructure
Make it available to more parts of the codemodel object.
2021-03-16 11:24:41 -04:00
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
1e2513b612 Merge topic 'vs-toolset-version' into release-3.20
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
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