Commit Graph

33849 Commits

Author SHA1 Message Date
Kitware Robot
d0cc1d9bf9 CMake Nightly Date Stamp 2023-03-20 00:01:27 -04:00
Kitware Robot
54d64dc6dd CMake Nightly Date Stamp 2023-03-19 00:01:09 -04:00
Kitware Robot
c3110a500e CMake Nightly Date Stamp 2023-03-18 00:01:21 -04:00
Kitware Robot
5f0c71da32 CMake Nightly Date Stamp 2023-03-17 00:01:12 -04:00
Brad King
2c2c2c2227 Merge topic 'vs-windows-min-version'
6546305b01 VS: Add CMAKE_VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8319
2023-03-16 09:11:07 -04:00
Brad King
737e97e069 Merge topic 'vs-BuildInParallel'
4c866cac40 VS: Do not regenerate build system concurrently with CMP0147

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8329
2023-03-16 09:08:45 -04:00
Brad King
b0076f3f49 Merge topic 'apple-archs'
98e319a88f macOS: Suppress default '-arch arm64' with CMAKE_<LANG>_COMPILER_TARGET
43e973eba2 cmGeneratorTarget: Pass language to GetAppleArchs when possible
93afe804ce cmGeneratorTarget: Convert GetAppleArchs output argument to return value

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8327
2023-03-16 09:07:39 -04:00
Kitware Robot
9d439e235c CMake Nightly Date Stamp 2023-03-16 00:01:17 -04:00
Brad King
4c866cac40 VS: Do not regenerate build system concurrently with CMP0147
The VS generators add a custom command to `CMakeLists.txt` to re-run
CMake when input files have changed.  Mark this custom command as if it
were specified with `USES_TERMINAL`.  We already do this for the
equivalent `rebuild_cache` target in Makefile and Ninja generators.

This matters since commit d6353e74b4 (VS: Add policy to build custom
commands concurrently, 2023-03-10) because with policy CMP0147 set to
NEW, we now add `BuildInParallel` in `.vcxproj` file entries for custom
commands that do not have `USES_TERMINAL` set, but we do not want to
re-run CMake concurrently with other custom commands.

Issue: #18405
2023-03-15 14:33:36 -04:00
Brad King
98e319a88f macOS: Suppress default '-arch arm64' with CMAKE_<LANG>_COMPILER_TARGET
Since commit b6c60f14b6 (macOS: Default to arm64 architecture on Apple
Silicon hosts, 2020-09-28, v3.19.0-rc1~63^2) we add `-arch arm64` by
default on Apple Silicon hosts if `CMAKE_OSX_ARCHITECTURES` is not set.
This is necessary to prevent the toolchain from selecting its own
default architecture based on that of the build tool (e.g., `x86_64`).

If `CMAKE_<LANG>_COMPILER_TARGET` is set, its `-target` flag tells the
compiler what architecture to use, so do not add `-arch arm64`.

Fixes: #24599
2023-03-15 10:50:26 -04:00
Brad King
43e973eba2 cmGeneratorTarget: Pass language to GetAppleArchs when possible 2023-03-15 10:18:41 -04:00
Brad King
93afe804ce cmGeneratorTarget: Convert GetAppleArchs output argument to return value 2023-03-15 10:11:37 -04:00
halx99
6546305b01 VS: Add CMAKE_VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION variable
Provide a way to initialize the `VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION`
target property on targets.  It sets `WindowsTargetPlatformMinVersion`
in `.vcxproj` files.
2023-03-15 10:03:16 -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