Commit Graph

33810 Commits

Author SHA1 Message Date
Brad King
49167cf68f Source: Adjust stack sizes and recursion limits to work together
Adjust `CMake_DEFAULT_RECURSION_LIMIT` and/or the process stack size on
each platform to pass the `RunCMake.MaxRecursionDepth` test's "default"
cases.
2023-03-13 11:50:21 -04:00
Brad King
9504cef8c4 Tests: Allow RunCMake.MaxRecursionDepth to test public-facing default limit
Previously we compiled in a smaller default limit during nightly testing
and CI builds, so we were not testing the same default limit that
end-users will see.  Instead, set the limit during testing using an
environment variable so that we can unset it when testing the default
limit in `RunCMake.MaxRecursionDepth`.
2023-03-13 11:49:56 -04:00
Brad King
60ef076bac find_package: Enforce maximum nesting depth below maximum recursion depth
The stack usage for nested `find_package` calls is much larger than for
other kinds of recursion, so enforce a lower limit to avoid stack
overflow.
2023-03-13 11:48:19 -04:00
Brad King
89b69bf1ad Add CMAKE_MAXIMUM_RECURSION_DEPTH environment variable
Extend the recursion limit controls added by commit a6982cff0d
(cmMakefile: Impose maximum recursion limit, 2018-12-14,
v3.14.0-rc1~82^2) with an environment variable that is used if the
CMake variable of the same name is not set.
2023-03-13 11:45:58 -04:00
Brad King
395895bda7 cmMakefile: Factor out helper to get recursion depth limit 2023-03-13 11:37:20 -04:00
Brad King
88bc8dfc14 cmMakefile: Store recursion depth limit as size_t 2023-03-13 11:32:03 -04:00
Brad King
fcad8d0630 cmMakefile: Improve parsing of CMAKE_MAXIMUM_RECURSION_DEPTH variable 2023-03-09 10:53:05 -05:00
Brad King
f8da094786 Merge topic 'windows-arm64-recursion-limit'
c68ebee9c2 cmake: Reduce default recursion depth when compiling for Windows ARM64

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8302
2023-03-09 07:35:16 -05:00
Kitware Robot
9cb32a481e CMake Nightly Date Stamp 2023-03-09 00:01:19 -05:00
Brad King
c68ebee9c2 cmake: Reduce default recursion depth when compiling for Windows ARM64
On Windows ARM64 the stack frames are large enough (at least in Debug
builds) that CMake language recursion to depth 1000 overflows the stack.
Reduce the limit for this compiler.

Suggested-by: Bill Hoffman <bill.hoffman@kitware.com>
2023-03-08 11:56:44 -05:00
Brad King
12234b2851 Merge topic 'vs-props-order'
d3c4c6d630 VS: Import default C++ props file before toolset-specific props file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8294
2023-03-08 09:00:29 -05:00
Brad King
e939b82d2e Merge topic 'revert-vs-BuildInParallel'
abb1c12162 VS: Revert "Build custom commands concurrently when possible"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8297
2023-03-08 08:56:29 -05:00
Brad King
ae7f8ee0fb Merge topic 'file-install-macos'
963440ec01 Merge branch 'backport-3.26-file-install-macos'
81ac174514 Merge branch 'upstream-KWSys' into file-install-macos
a87ea777d4 KWSys 2023-03-08 (a3ff01ab)
a6f5bdd650 Merge branch 'backport-3.24-file-install-macos'
35f2b1bf5b file(INSTALL): Fix file ownership regression when running as root on macOS
a5d6548587 file(INSTALL): Fix file ownership regression when running as root on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8293
2023-03-08 08:52:09 -05:00
Brad King
81ac174514 Merge branch 'upstream-KWSys' into file-install-macos
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2023-03-08 (a3ff01ab)
2023-03-08 07:38:50 -05:00
Kitware Robot
394e1540a3 CMake Nightly Date Stamp 2023-03-08 00:01:13 -05:00
Matthew Voss
d3c4c6d630 VS: Import default C++ props file before toolset-specific props file
This avoids overwriting toolset-specific settings like `VCRedistDir`
with default settings.

Fixes: #22420
2023-03-07 14:41:32 -05:00
Brad King
abb1c12162 VS: Revert "Build custom commands concurrently when possible"
Since commit 33c15ae2b9 (VS: Build custom commands concurrently when
possible, 2023-01-19, v3.26.0-rc1~56^2) we add `BuildInParallel` to
custom commands in `.vcxproj` files.  However, this can break existing
projects that implicitly rely on serial execution of custom commands.
For example, custom commands in our FindCUDA module run MSVC (via nvcc)
with a common `vc*.pdb` file, and therefore cannot run in parallel.

Revert use of `BuildInParallel` while leaving most of the infrastructure
for it in place.  It can be restored later with an option or policy.

Fixes: #24576
Issue: #18405
2023-03-07 14:19:49 -05:00
Brad King
3d6075da4d Merge topic 'improve-doc-signatures'
533ebb072b Help: Use signature directive for string command
cd33f461a6 Help: Use signature directive for cmake_language command
74e3c1d313 Utilities/Sphinx: Add a directive to document command signatures
c09b760484 Utilities/Sphinx: Drop commented-out code from cmake domain impl
6e85ad7f8b Help/dev: Add per-directive sections in CMake Documentation Guide

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8243
2023-03-07 08:49:30 -05:00
Brad King
2e8e5c2cf0 Merge topic 'Xcode-frameworks-consumption'
ce1bdec3a4 Xcode: Fix missing Frameworks search paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8288
2023-03-07 08:48:40 -05:00
Kitware Robot
3b80d2870f CMake Nightly Date Stamp 2023-03-07 00:01:17 -05:00
Marc Chevrier
ce1bdec3a4 Xcode: Fix missing Frameworks search paths
Fixes: #24541
2023-03-06 09:15:48 -05:00
Brad King
6b08358e17 Merge topic 'Apple-text-Stubs-imported-configurations'
2e24123186 Apple: text-based stubs: manage imported configurations mapping

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8283
2023-03-06 09:03:48 -05:00
Kitware Robot
e4b1ac6282 CMake Nightly Date Stamp 2023-03-06 00:01:23 -05:00
Marc Chevrier
2e24123186 Apple: text-based stubs: manage imported configurations mapping 2023-03-05 14:39:56 +01:00
Kitware Robot
20e3884e9e CMake Nightly Date Stamp 2023-03-05 00:01:10 -05:00
Kitware Robot
eb7512e082 CMake Nightly Date Stamp 2023-03-04 00:01:19 -05:00
Matthew Woehlke
74e3c1d313 Utilities/Sphinx: Add a directive to document command signatures
Add a `signature` directive to offer a CMake version of Sphinx's
`function` directive, similar to that found in other domains (py, cpp,
etc.).  Like others, this takes one or more signatures as arguments and
creates dt/dd nodes from the signatures and the directive contents.
2023-03-03 17:05:02 -05:00
Brad King
0a9945cb8d Merge topic 'DxxxxWarnings'
442170a5e7 cm_cxx_features: Ignore MSVC command-line warnings (Dxxxx)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8277
2023-03-03 09:28:10 -05:00
Brad King
77cf8d24ab Merge topic 'update-kwsys'
1caf5cbd6a Merge branch 'upstream-KWSys' into update-kwsys
5433eea1a9 KWSys 2023-03-02 (ea806689)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8278
2023-03-03 09:27:28 -05:00
Brad King
87330a10e2 Merge topic 'ninja-multi-output-path-prefix'
df38eaab2c Ninja Multi-Config: Write output path prefix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8280
2023-03-03 09:18:34 -05:00
Kitware Robot
c465e0e3bb CMake Nightly Date Stamp 2023-03-03 00:01:12 -05:00
Kyle Edwards
def618f1ae Merge topic 'TargetRunTimeDllDirs'
a2c9c4f202 Add test for the new TARGET_RUNTIME_DLL_PATHS genex
aa68de0a27 TARGET_RUNTIME_DLLS: minor refactoring of shared-check.cmake
2ce3d62ffb Help: add documentation for the new TARGET_RUNTIME_DLL_DIRS genex
c351dcd967 TARGET_RUNTIME_DLL_DIRS: add the new genex to cmGeneratorExpressionNode
064c3244da TARGET_RUNTIME_DLLS: fix test for this genex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !8247
2023-03-02 16:28:30 -05:00
Kyle Edwards
df38eaab2c Ninja Multi-Config: Write output path prefix
Fixes: #24566
2023-03-02 15:10:53 -05:00
Brad King
1caf5cbd6a Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2023-03-02 (ea806689)
2023-03-02 11:11:12 -05:00
Roffild
442170a5e7 cm_cxx_features: Ignore MSVC command-line warnings (Dxxxx)
The Dxxxx warning range is for command-line warnings [1].  These are
incidental and should not affect the result of the feature check.

[1] https://learn.microsoft.com/en-us/cpp/error-messages/tool-errors/command-line-errors-d8000-through-d9999
2023-03-02 10:25:16 -05:00
Brad King
5fe186ade7 Merge topic 'target_sources-backtrace'
b909be9e23 target_sources: Fix backtrace on missing source
4a3e79048b Tests: Add RunCMake.target_sources case covering missing source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8268
2023-03-02 10:07:31 -05:00
Brad King
48c2a146ae Merge topic 'clean-AddCacheEntry'
87c4eba5cb cmState::AddCacheEntry(): Remove unused overloads

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8269
2023-03-02 09:54:59 -05:00
Brad King
f9888e5f51 Merge topic 'dont_use_bom_with_cuda'
c5305cf493 Makefile: Don't pass the CUDA compiler response files with UTF8_BOM

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ivan Katalenić <ivankatalenic100@gmail.com>
Merge-request: !8267
2023-03-02 09:54:03 -05:00
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
Kitware Robot
b32949d47e CMake Nightly Date Stamp 2023-03-02 00:01:14 -05:00
Brad King
6c0b3d2b7e CMake 3.26.0-rc5 2023-03-01 09:43:05 -05:00
Brad King
532ca3e7c7 Merge topic 'check-curses-min-cmake'
d70582eed8 ccmake: Update minimum required version of CMake for curses check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8272
2023-03-01 09:36:36 -05:00
Brad King
a6b4bbfa57 Merge topic 'csharp_sdk_win32_exe'
0dff040f10 VS : Support WIN32_EXECUTABLE on SDK style projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sumit Bhardwaj <bhardwajs@outlook.com>
Merge-request: !8263
2023-03-01 09:22:05 -05:00
Brad King
0c30af2753 Merge topic 'remove-dart-modules'
2e469212c8 Dart,FindDart: Add policy to remove these modules
6dd2948b4b Tests: Port "testing" test from Dart module to CTest module
1f5ff4d131 Merge branch 'upstream-KWSys' into remove-dart-modules
ec3652a0bd KWSys 2023-02-28 (68534a6a)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8265
2023-03-01 09:21:03 -05:00
Brad King
d70582eed8 ccmake: Update minimum required version of CMake for curses check
This should have been part of commit d6b811fb82 (Require CMake 3.13+ to
configure CMake itself, 2022-02-22, v3.24.0-rc1~605^2~1).
2023-03-01 09:15:38 -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
Kitware Robot
8807292ef4 CMake Nightly Date Stamp 2023-03-01 00:01:15 -05:00
Vitaly Stakhovsky
87c4eba5cb cmState::AddCacheEntry(): Remove unused overloads 2023-02-28 19:44:42 -05:00
Brad King
b909be9e23 target_sources: Fix backtrace on missing source
If a source file is not found, the error message reports a backtrace.
Previously the backtrace pointed at where the target was created.
In the case of `target_sources`, the missing source may have been
named elsewhere.

Fixes: #24538
2023-02-28 18:07:36 -05:00
Robert Maynard
c5305cf493 Makefile: Don't pass the CUDA compiler response files with UTF8_BOM
Fixes #24544
2023-02-28 15:39:55 -05:00