Commit Graph

33838 Commits

Author SHA1 Message Date
Orkun Tokdemir
a42ecb1614 Autogen: Restore AUTOGEN_PARALLEL support for numbers
Refactoring in commit d867e05892 (Autogen: Use JSON instead of CMake
script for info files, 2019-09-20, v3.16.0-rc1~57^2) broke support for
numerical values of `AUTOGEN_PARALLEL`.  Parse and verify the range.
Warn if the value is invalid.

Fixes: #20376
2023-03-20 12:10:01 -04:00
Kitware Robot
9d439e235c CMake Nightly Date Stamp 2023-03-16 00:01:17 -04:00
Brad King
1ec4c65791 Merge topic 'sphinx-cref'
302f5171d8 Utilities/Sphinx: Add 'cref' role
bc77ddb90c Utilities/Sphinx: Factor out part of CMakeXRefRole

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8313
2023-03-15 09:54:18 -04:00
Kitware Robot
91fe2438b4 CMake Nightly Date Stamp 2023-03-15 00:01:11 -04:00
Matthew Woehlke
302f5171d8 Utilities/Sphinx: Add 'cref' role
Add a role that can be used to create local links (a la '`LINK`_'), but
that also applies literal style. This is particularly useful for
referring to subcommands within the command's documentation in a style
that is consistent with ':command:`BAR <foo(BAR)>`' but is much less
verbose.

Although this is intended for subcommands, it works with any local
reference.

Co-authored-by: Brad King <brad.king@kitware.com>
2023-03-14 15:20:47 -04:00
Brad King
d45992e633 Merge topic 'recursion-limit'
49167cf68f Source: Adjust stack sizes and recursion limits to work together
9504cef8c4 Tests: Allow RunCMake.MaxRecursionDepth to test public-facing default limit
60ef076bac find_package: Enforce maximum nesting depth below maximum recursion depth
89b69bf1ad Add CMAKE_MAXIMUM_RECURSION_DEPTH environment variable
395895bda7 cmMakefile: Factor out helper to get recursion depth limit
88bc8dfc14 cmMakefile: Store recursion depth limit as size_t
fcad8d0630 cmMakefile: Improve parsing of CMAKE_MAXIMUM_RECURSION_DEPTH variable
497f7d5c1a Tests: Simplify option passing to RunCMake.MaxRecursionDepth cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8307
2023-03-14 09:35:45 -04:00
Brad King
db4f4ad24e Merge topic 'support_cubin_fatbin_optix_cuda_output'
2def6a874b CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8259
2023-03-14 09:35:00 -04:00
Kitware Robot
614cf24aae CMake Nightly Date Stamp 2023-03-14 00:01:12 -04:00
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
Robert Maynard
2def6a874b CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilation 2023-03-13 09:54:00 -04:00
Brad King
7d43bcb4db Merge topic 'vs-BuildInParallel'
7a7793e6d7 FindCUDA: Disallow with CMP0147 under Visual Studio
d6353e74b4 VS: Add policy to build custom commands concurrently

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8314
2023-03-13 09:39:28 -04:00
Brad King
9128a4c158 Merge topic 'revert-optimize-target-depends-closure'
685108a582 Ninja: Revert "Optimize target depends closure" due to performance regression

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8315
2023-03-13 09:36:02 -04:00
Kitware Robot
974ee2d26c CMake Nightly Date Stamp 2023-03-13 00:01:34 -04:00
Brad King
d6353e74b4 VS: Add policy to build custom commands concurrently
In commit 33c15ae2b9 (VS: Build custom commands concurrently when
possible, 2023-01-19, v3.26.0-rc1~56^2) we added `BuildInParallel` to
custom commands in `.vcxproj` files, but that had to be reverted by
commit abb1c12162 (VS: Revert "Build custom commands concurrently when
possible", 2023-03-07, v3.26.0-rc6~3^2) because some projects may have
custom commands that accidentally rely on serial execution in MSBuild.

Add a policy to use `BuildInParallel` for custom commands in projects
that have been updated to set the policy to `NEW`.

Fixes: #18405
2023-03-12 07:51:58 -04:00
Kitware Robot
9fe6771b80 CMake Nightly Date Stamp 2023-03-12 00:01:09 -05:00
Kitware Robot
e1d890d912 CMake Nightly Date Stamp 2023-03-11 00:01:16 -05:00
Brad King
685108a582 Ninja: Revert "Optimize target depends closure" due to performance regression
Revert commit 1f16af01f4 (cmGlobalNinjaGenerator: Optimize target
depends closure, 2023-01-17, v3.26.0-rc1~74^2).  It regressed generation
time for some projects.  Revert it pending further investigation.
2023-03-10 15:13:23 -05:00
Brad King
46d5349e8f Merge topic 'help-signatures'
8c52458a9e cmRST: Fix cmake domain directives with newline before argument
d4b21bcdd6 cmRST: Fix typo in comment
6a84717d17 cmRST: Convert enum types to enum class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8310
2023-03-10 11:08:52 -05:00
Brad King
d95ac61225 Merge topic 'cxx-module-extensions'
45d1925efc Treat '.ccm', '.cxxm', and '.c++m' files as C++ sources
8c96d145c1 Tests/RunCMake: Match 'Tried extensions' output more robustly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8308
2023-03-10 11:08:11 -05:00
Brad King
9cf38e7b14 Merge topic 'FindCUDA-remove'
2c146a7fc5 FindCUDA: Add policy to remove this module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8306
2023-03-10 11:02:07 -05:00
Kitware Robot
ecf7348cef CMake Nightly Date Stamp 2023-03-10 00:01:18 -05:00
Brad King
8c52458a9e cmRST: Fix cmake domain directives with newline before argument
The `signature` directive added by commit 74e3c1d313 (Utilities/Sphinx:
Add a directive to document command signatures, 2023-02-24) will be
commonly used with the form:

    .. signature::
       some_command(SOME_SIGNATURE)

      Docs for this signature.

Drop the assumption that all CMake domain directives are immediately
followed by their argument on the same line.
2023-03-09 16:10:03 -05:00
Brad King
d4b21bcdd6 cmRST: Fix typo in comment 2023-03-09 16:10:03 -05:00
Brad King
6a84717d17 cmRST: Convert enum types to enum class
This improves readability and avoids unintended conversions.
2023-03-09 16:09:48 -05:00
Brad King
45d1925efc Treat '.ccm', '.cxxm', and '.c++m' files as C++ sources
These extensions are used by convention for C++ module interface units
with Clang.

For now, do not add any tests using these extensions.
Very few compilers recognize them as C++ sources.
Tests can be added later as part of C++ modules support.
2023-03-09 14:36:01 -05:00
Brad King
fcad8d0630 cmMakefile: Improve parsing of CMAKE_MAXIMUM_RECURSION_DEPTH variable 2023-03-09 10:53:05 -05:00
Brad King
2c146a7fc5 FindCUDA: Add policy to remove this module
The `FindCUDA` module has been deprecated since CMake 3.10.
Add a policy to pretend it doesn't exist in order to encourage
projects to port away from it.
2023-03-09 07:39:36 -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
454bfa77b2 CMake 3.26.0-rc6 2023-03-08 14:04:09 -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
cea9dae92a Merge topic 'revert-vs-BuildInParallel' into release-3.26
abb1c12162 VS: Revert "Build custom commands concurrently when possible"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8297
2023-03-08 08:56:28 -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
35f2b1bf5b file(INSTALL): Fix file ownership regression when running as root on macOS
Backport KWSys commit `51272e80e` (SystemTools: Avoid macOS copyfile
semantic differences as root, 2023-03-07).

Fixes: #24577
2023-03-07 11:39:58 -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