Commit Graph

3039 Commits

Author SHA1 Message Date
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
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
385435cf78 Help: Organize and revise 3.26 release notes
Add section headers similar to the 3.25 release notes and move each
individual bullet into an appropriate section.  Revise a few bullets.

Add a bullet for `FindImageMagick` that was accidentally left out
when its changes were made.
2023-02-01 14:02:17 -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
e107fd0713 Merge branch 'release-3.25' 2023-01-19 10:40:17 -05:00
Brad King
e2be23a2b3 CMake 3.25.2 2023-01-19 09:32:19 -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
Craig Scott
c1294454e5 Merge topic 'doc-SYSTEM'
dfab263825 Help: Clarify and update SYSTEM-related docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8027
2022-12-19 15:57:22 -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
Craig Scott
dfab263825 Help: Clarify and update SYSTEM-related docs 2022-12-17 20:51:25 +11: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
Brad King
84c2518a7b Merge topic 'COMPILE_DEFINITIONS-property-cleanup'
7480fa0a5f COMPILE_DEFINITIONS property: ensure leading -D is removed in all cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8004
2022-12-14 09:03:08 -05:00
Brad King
29c4690e0a Merge topic 'cuda-nvcc-cuda20'
0aeeb8160c CUDA: Add support for cuda_std_20 for nvcc 12.0+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8008
2022-12-14 08:58:55 -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
Robert Maynard
0aeeb8160c CUDA: Add support for cuda_std_20 for nvcc 12.0+
CUDA 12.0 has been released with support for `-std=c++20`.
2022-12-13 10:18:15 -05: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
4751c9399e Merge topic 'revert-find_library-msvc-libfoo.a'
955d6245c1 MSVC: Revert "Teach find_library to consider the 'libfoo.a' naming convention"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7962
2022-11-29 10:15:57 -05:00
Brad King
955d6245c1 MSVC: Revert "Teach find_library to consider the 'libfoo.a' naming convention"
Revert commit be848a71b0 (MSVC: Teach find_library to consider the
'libfoo.a' naming convention, 2022-09-19, v3.25.0-rc1~111^2).  When
targeting the MSVC ABI, this causes GNU-ABI libraries to be found in
cases they were not previously, and broke existing builds.  Revert the
change pending further discussion on how to handle the motivating use
case.

Issue: #23975
Fixes: #24168
2022-11-28 15:42:27 -05: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
friendlyanon
59573bf5b9 project: Warn at top-level if cmake_minimum_required wasn't called
The top-level project() call will now issue an AUTHOR_WARNING if it
wasn't called after cmake_minimum_required().

Fixes: #24071
2022-11-11 22:49:36 +01:00
Brad King
e159b5b2ae Merge topic 'doc-improvements'
d4d1f85297 Help: Move a note about arguments and genexes into include file
968224484f Help: Drop unused `PROPERTY_GENEX` replace from `prop_tgt/INTERFACE_*` files
65457e4fae Help: Add _See Also_ sections to related CMake commands
c86ec79d07 Help: Use direct refs to genexes instead of ``$<GENEX-NAME>``
8c6274326d Help: Use CMake highlighting for command synopsis
c356a94512 Help: Use monospaced font for a genex name in a section title
f98c8707f4 Help: Use `code-block:: cmake` instead of `::` for sub-commands descriptions
2ba351ca4f Help: ``CMake`` → CMake
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7873
2022-11-10 10:11:22 -05:00
Alex Turbov
c86ec79d07 Help: Use direct refs to genexes instead of `$<GENEX-NAME>` 2022-11-09 23:52:30 +04:00