Commit Graph

2493 Commits

Author SHA1 Message Date
Brad King
1d7fb31778 Merge topic 'Apple-handle-Text-Stubs'
ede33f30cf Apple: Handle generation and comsuption of text-based stubs (.tbd files)
fcbd723a50 Enhance support functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !8204
2023-03-02 09:53:03 -05:00
Marc Chevrier
ede33f30cf Apple: Handle generation and comsuption of text-based stubs (.tbd files)
Fixes: #24123
2023-03-01 12:23:28 +01:00
Brad King
2e469212c8 Dart,FindDart: Add policy to remove these modules
These modules and the "DART" tool they support have long been replaced
by CTest.
2023-02-28 08:43:45 -05:00
Brad King
40539096fd Merge topic 'dll-name-soversion'
a7f9c7da26 Add option to add SOVERSION to DLL names
9694504adc Tests: Simplify RunCMake.TargetArtifacts spec
3cd34eb279 Tests: Rename RunCMake.{ArtifactOutputDirs => TargetArtifacts}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8021
2023-02-28 08:29:20 -05:00
Ralf Habacker
a7f9c7da26 Add option to add SOVERSION to DLL names
Add variable/target property `[CMAKE_]DLL_NAME_WITH_SOVERSION`.

Fixes: #24251
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2023-02-27 09:18:34 -05:00
Kyle Edwards
18e02ace5b install(CODE|SCRIPT): Support $<INSTALL_PREFIX> genex
Fixes: #24534
2023-02-24 10:17:45 -05:00
Brad King
88b75204e5 Merge topic 'PATH-genex-handle-list-of-paths'
e395310a21 PATH-genex: handle lists for path decomposition and transformations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8238
2023-02-24 08:35:19 -05:00
Brad King
df9c4b1872 find_package: Use <PACKAGENAME>_ROOT variables as search prefixes
Extend commit eb35d8884b (find_package: Use PackageName_ROOT variables
as search prefixes, 2018-03-15, v3.12.0-rc1~349^2) to also check
upper-case `<PACKAGENAME>_ROOT` variables.  Add policy `CMP0144` to
enable the behavior in a compatible way.

Fixes: #24403
2023-02-23 09:15:14 -05:00
Marc Chevrier
e395310a21 PATH-genex: handle lists for path decomposition and transformations
Fixes: #24371
2023-02-21 19:34:43 +01:00
Abdelmaged Khalifa
ea2a05f402 Add variable CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY
Add CMake variable `CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY` to enable
option `DEPENDS_EXPLICIT_ONLY` on all uses of `add_custom_command`.

Fixes: #17097
2023-02-17 17:12:12 +02:00
Brad King
ef5a4d964b Deprecate "extra" generators in favor of cmake-file-api(7)
The "extra" generators were created in CMake's early years to provide
support for users of specific IDEs by directly generating their project
files alongside make or ninja files.  Nowadays the file-api provides a
more generic, maintainable, well-tested, and robust way for IDEs to view
CMake project build trees.  Deprecate the legacy "extra" generators to
encourage the corresponding IDEs to use the file-api.

Fixes: #19090
2023-02-15 10:48:26 -05:00
Brad King
e2ed34abf8 Merge topic 'ninja-custom-command-depends'
082ccd7530 add_custom_command: Add DEPENDS_EXPLICIT_ONLY option for Ninja

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8198
2023-02-15 08:57:32 -05:00
Abdelmaged Khalifa
082ccd7530 add_custom_command: Add DEPENDS_EXPLICIT_ONLY option for Ninja
Add option `DEPENDS_EXPLICIT_ONLY` to `add_custom_command` to indicate
that implicit dependencies coming from users of the output are not
needed, and only consider dependencies explicitly specified in the
custom command.

Fixes: #17097
2023-02-14 08:56:59 -05:00
Brad King
3a4791548d Deprecate compatibility with CMake versions older than 3.5
Issue a deprecation warning on calls to `cmake_minimum_required` or
`cmake_policy` that set policies based on versions older than 3.5.
Note that the effective policy version includes `...<max>` treatment.
Update the check from commit 5845c218d7 (Deprecate compatibility with
CMake versions older than 2.8.12, 2020-06-12, v3.19.0-rc1~629^2).
2023-02-11 06:25:11 -05:00
Brad King
d7f440c5db Deprecate Visual Studio 9 2008 generator
Update documentation to mark the generator deprecated.  Add a warning at
the end of generation plus an option to turn off the warning.
2023-02-08 11:49:27 -05:00
Kyle Edwards
33e27f6ca6 <LANG>_LINKER_LAUNCHER: Allow generator expressions 2023-02-02 11:58:56 -05:00
Brad King
641dd4ee73 Begin post-3.26 development 2023-02-01 14:46:16 -05:00
Brad King
e5fee37101 Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2023-02-01 14:42:26 -05:00
Brad King
4c63f031c1 Help: Consolidate 3.26 release notes
Run the `Utilities/Release/consolidate-relnotes.bash` script to move
notes from `Help/release/dev/*` into `Help/release/3.26.rst`.
2023-02-01 13:58:23 -05:00
Brad King
bc1ba6d56b Help: Document experimental feature gate affecting CXX_SCAN_FOR_MODULES
Also drop the release note for `CXX_SCAN_FOR_MODULES`, as the rest of
the C++ modules support has not yet been mentioned in release notes
(since it is still experimental).
2023-02-01 13:58:23 -05:00
Robert Maynard
2a94c762ed FindCUDAToolkit: Add support for CUDA::nvrtc_static 2023-01-20 12:05:43 -05:00
Brad King
a429e4b9b1 CYGWIN: Drop pre-2.8.4 compatibility mode CMAKE_LEGACY_CYGWIN_WIN32
Prior to CMake 2.8.4 (released in 2011), we defined `WIN32` on CYGWIN.
That was removed, but an undocumented `CMAKE_LEGACY_CYGWIN_WIN32`
compatibility mode was left to help projects transition.  Only projects
that do not require at least 2.8.4 as their minimum CMake version need
the compatibility mode.  We've also long warned about projects that do
not require at least 2.8.12, so it is now reasonable to remove the
legacy compatibility mode.
2023-01-19 14:29:35 -05:00
Brad King
a78cba5197 message: Add CONFIGURE_LOG mode to record a message in the configure log
Provide a replacement for `file(APPEND .../CMake{Output,Error}.log)`
that records messages in the configure log.

Issue: #23200
2023-01-18 11:37:11 -05:00
Brad King
45f86b9990 Merge topic 'configure-log'
48292c8624 try_compile: Record stack of in-progess checks in configure log
d4bf7d80c6 try_compile: Add a NO_LOG option to skip recording in the configure log
9d9e8450a8 try_compile: Add optional LOG_DESCRIPTION to record in configure log
65ed5c2ca8 try_compile: Report underlying error when COPY_FILE fails
0418efb7ad Tests: Add explicit ConfigureLog case to RunCMake.try_compile
189557bd74 cmake: Make entire in-progress check stack available internally
96ce3581ab Help: Clarify backtrace order in cmake-configure-log(7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8072
2023-01-17 09:26:50 -05:00
Brad King
dd18be5ebf Merge topic 'ctest-no-tests-action-env-var'
0661de58d8 ctest(1): Add CTEST_NO_TESTS_ACTION env var

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8044
2023-01-17 09:18:04 -05:00
Brad King
d4bf7d80c6 try_compile: Add a NO_LOG option to skip recording in the configure log 2023-01-16 17:16:12 -05:00
Brad King
9d9e8450a8 try_compile: Add optional LOG_DESCRIPTION to record in configure log
Issue: #23200
2023-01-16 16:58:50 -05:00
Brad King
5dddc49e03 Merge topic 'fea/add-copy_directory_if_different'
c1170b5602 cmake: Add -E copy_directory_if_different

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8059
2023-01-13 08:54:21 -05:00
friendlyanon
0661de58d8 ctest(1): Add CTEST_NO_TESTS_ACTION env var
This environment variable provides a default value for the
--no-tests=<action> command line argument.
2023-01-13 13:33:39 +01:00
Brad King
a46a5aedee Merge topic 'bug/cuda-toolkit-support-arm64-sbsa'
743d4181b4 FindCUDAToolkit: Support cross-compilation to sbsa-linux
e60fa80fbe FindCUDAToolkit: Handle CUDA::nvToolsExt not existing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8057
2023-01-12 09:29:28 -05:00
Robert Maynard
c1170b5602 cmake: Add -E copy_directory_if_different
Fixes #21584
2023-01-12 08:39:41 -05:00
Russell Greene
e4fcdfa301 Set CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT on single-variant compilers
The `GNU` and `MSVC` compilers obviously use their own front-end
command-line style.  Also set this for `AppleClang`.

Fixes: #24232
2023-01-11 14:50:40 -05:00
Robert Maynard
743d4181b4 FindCUDAToolkit: Support cross-compilation to sbsa-linux
Fixes #24192
2023-01-11 11:27:37 -05:00
Brad King
d811d86fd7 FileAPI: Add "configureLog" object kind
Provide clients with a way to get a known set of configure log event
versions.

Issue: #23200
2022-12-17 08:52:04 -05:00
Matthew Woehlke
746c776caf ConfigureLog: Add infrastructure for structured configure event logging
Add infrastructure for a "configure log".  Use YAML for a balance of
machine- and human-readability to records details of configure-time
events in a structured format.

Teach the RunCMake test framework to support matching the configure log.

Issue: #23200
2022-12-16 10:11:37 -05:00
Marc Chevrier
7480fa0a5f COMPILE_DEFINITIONS property: ensure leading -D is removed in all cases
Fixes: #24186
2022-12-13 16:54:56 +01:00
Brad King
5ce0f03cce VS: Add a variable to report the Visual Studio version build number
VS 2017 and above come with a Visual Studio Installer tool that tracks
four-component Visual Studio version numbers.  We already detect the VS
version number because it is needed to make some generation decisions.
Provide the number to projects in a `CMAKE_VS_VERSION_BUILD_NUMBER`
variable so they can use it similarly.

Fixes: #24230
2022-12-07 17:49:04 -05:00
Kyle Edwards
232467eb1c clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR property
Fixes: #21362
2022-12-06 10:39:29 -05:00
Marc Chevrier
77d734aede FindPython: add support for Stable ABI
Fixes: #24141
2022-11-29 16:48:08 +01:00
Brad King
62172b4ab7 Merge topic 'custom-command-comment-genex'
26d813092b add_custom_{command,target}: add genex support for COMMENT
60a5a39022 cmCustomCommandGenerator: refactor GetComment to return std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7887
2022-11-22 09:47:59 -05:00
Brad King
e69251c828 Merge topic 'xcode-ios-extensionkit'
b99c386122 Xcode: Allow bundling extensionkit extensions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7900
2022-11-21 10:06:20 -05:00
Brad King
55e3168dc4 Merge topic 'lang-std-flag-order'
a1c20b08b4 cmLocalGenerator: Inline AddCompilerRequirementFlag in only call site
914571a042 Place language standard flags just after CMAKE_<LANG>_FLAGS
ad16ae5c70 VS: Recognize -std: flag in CMAKE_C_FLAGS in target with C++ sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7931
2022-11-21 10:03:35 -05:00
Brad King
fa7afe5eb3 Merge topic 'cxx-scanning-properties'
a02d792c6e cxxmodules: add properties to control scanning
008c09d6db cmNinjaTargetGenerator: factor out determining the fileset of a source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7935
2022-11-21 10:00:12 -05:00
Peter Würth
26d813092b add_custom_{command,target}: add genex support for COMMENT
Evaluate and expand generator expressions in the `COMMENT` argument of
the `add_custom_command()` and `add_custom_target()` commands.
This allows to include generator expressions, e.g. a targets location
$<TARGET_...> or the current configuration $<CONFIG>, in the build-time
messages.

Fixes #22507
2022-11-19 13:32:56 +01:00
Russell Greene
b99c386122 Xcode: Allow bundling extensionkit extensions
Fixes: #24150
2022-11-18 13:58:03 -06:00
Brad King
914571a042 Place language standard flags just after CMAKE_<LANG>_FLAGS
Previously we added the language standard flag near the end of all
options, even after those added by `add_compile_options` and friends.
However, on some compilers such as MSVC, the `-std` flag may reset
defaults for flags that precede it on the command line.  Move the
language standard flag to before all other flags that CMake adds for
other abstractions, and before those added by `add_compile_options`.

`CMAKE_<LANG>_FLAGS` should still precede the language flags though,
because they are meant to be treated as language-wide modifications to
the compiler defaults, similar to `$CC $CFLAGS`.

Fixes: #23860
Fixes: #24170
2022-11-18 11:44:52 -05:00
Ben Boeckel
a02d792c6e cxxmodules: add properties to control scanning
The `CXX_SCAN_FOR_MODULES` property may be used to control scanning for
targets and for source files rather than assuming "C++20 always needs to
be scanned".
2022-11-18 07:54:31 -05:00
Kyle Edwards
38cbf5e15b Genex: Add $<BUILD_LOCAL_INTERFACE:...> genex
Fixes: #23209
2022-11-17 09:31:27 -05:00
Brad King
eda68d229d Merge topic 'cmake-E-copy-t-mode'
8d9069e5b6 cmake -E copy: Add support for -t argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7913
2022-11-15 09:14:07 -05:00
Kyle Edwards
8d9069e5b6 cmake -E copy: Add support for -t argument
Fixes: #23543
2022-11-15 07:47:07 -05:00