Commit Graph

61390 Commits

Author SHA1 Message Date
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
Brad King
9b68949a27 Merge branch 'release-3.26' 2023-03-14 09:29:02 -04:00
Brad King
c77801029d Merge topic 'revert-CheckCompilerFlag-clang-argument-unused'
97fcd3bd30 CheckCompilerFlag: Revert 'Match the Clang "argument unused" output ...'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8322
2023-03-14 09:29:01 -04:00
Brad King
c2b1d9bf97 Merge topic 'revert-CheckCompilerFlag-clang-argument-unused' into release-3.26
97fcd3bd30 CheckCompilerFlag: Revert 'Match the Clang "argument unused" output ...'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8322
2023-03-14 09:29:00 -04:00
Kitware Robot
614cf24aae CMake Nightly Date Stamp 2023-03-14 00:01:12 -04:00
Brad King
97fcd3bd30 CheckCompilerFlag: Revert 'Match the Clang "argument unused" output ...'
Revert commit 5b45a3d0ce (CheckCompilerFlag: Match the Clang "argument
unused" output for all languages, 2023-01-23, v3.26.0-rc1~38^2).  It
broke existing projects that were silently tolerating unrelated unused
arguments in their checks for C and CXX.  For example, using
`CFLAGS=-nostdinc` or `CXXFLAGS=-nostdinc++` causes those flags to be
used when driving the linker as well, and Clang warns they are unused in
that case.

Add a test case covering the now-restored behavior.

Fixes: #24591
2023-03-13 16:18:50 -04:00
Brad King
bd4616f624 Merge branch 'release-3.26' 2023-03-13 14:32:12 -04:00
Brad King
b25127e86d Merge branch 'release-3.25' 2023-03-13 14:32:02 -04:00
Brad King
bd74679ab5 Merge branch 'release-3.25' into release-3.26 2023-03-13 14:31:47 -04:00
Brad King
2644555536 Merge branch 'backport-3.25-log-failed-compiler-id' into release-3.25
Merge-request: !8320
2023-03-13 14:31:05 -04:00
Brad King
9f54901ed9 CompilerId: Restore logging of failed identifications in CMake 3.25
Changes in commit 9c5bd7fe3a (CompilerId: Output errors from all
attempts at detection, 2022-08-16, v3.25.0-rc1~290^2) accidentally
stopped logging failed compiler identification build output.

This was fixed for CMake 3.26 and later by commit 24ccc8c3c9
(CompilerId: Restore logging of failed identifications, 2023-01-16,
v3.26.0-rc1~70^2~6).  Backport it to 3.25.
2023-03-13 14:29:50 -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
072372aeb8 Merge topic 'findopengl-gles'
beb0a56c86 FindOpenGL: support finding GLES2 and GLES3

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !8309
2023-03-13 09:37:41 -04:00
Brad King
a237d98bf9 Merge branch 'release-3.26' 2023-03-13 09:36:02 -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
Brad King
8e4c849441 Merge topic 'revert-optimize-target-depends-closure' into release-3.26
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:01 -04:00
Kitware Robot
974ee2d26c CMake Nightly Date Stamp 2023-03-13 00:01:34 -04:00
Brad King
7a7793e6d7 FindCUDA: Disallow with CMP0147 under Visual Studio
FindCUDA's custom commands invoke `nvcc`, which invokes `cl`.  Under VS
this is done without a `/FS` flag, so `.pdb` generation races if we
use `BuildInParallel`.  The FindCUDA module has already been removed by
policy CMP0146 after being deprecated since CMake 3.10, so it is
simplest to just disallow this combination of features.

Issue: #24576
2023-03-12 07:52:15 -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
Jaswant Panchumarti
beb0a56c86 FindOpenGL: support finding GLES2 and GLES3
This also makes the EGL component not GLVND-specific, so documentation
and tests are updated accordingly.
2023-03-10 13:24:27 -05:00
Brad King
9db40bec4e Merge topic 'signature-refs'
cc21d0e478 Utilities/Sphinx: Make signatures linkable
37e015d4a6 Utilities/Sphinx: Refactor Sphinx reference recording

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8305
2023-03-10 11:09:59 -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
8c96d145c1 Tests/RunCMake: Match 'Tried extensions' output more robustly 2023-03-09 14:35:05 -05:00
Matthew Woehlke
cc21d0e478 Utilities/Sphinx: Make signatures linkable
Add signatures to the collection of observed objects (which can be
referenced elsewhere). Don't automatically strip parameters from a
:command: reference, as these may now link signatures. (Do, however,
munge them into 'text <ref>' form if they aren't already, as not doing
so adds an extra '()' for some reason.) Correspondingly, change xref
resolution to try to match 'command' when a ref like 'command(args)' is
not matched, so that existing links to commands that have not been
converted to use the new signature directive don't immediately break.
2023-03-09 11:32:07 -05:00
Brad King
fcad8d0630 cmMakefile: Improve parsing of CMAKE_MAXIMUM_RECURSION_DEPTH variable 2023-03-09 10:53:05 -05:00
Brad King
497f7d5c1a Tests: Simplify option passing to RunCMake.MaxRecursionDepth cases 2023-03-09 10:52:59 -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
b6ffbffaf2 Merge topic 'test-minver'
bd7b2293aa Tests: Bump CMake minimum required version in find-module tests to 3.5

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8304
2023-03-09 07:38:23 -05:00
Brad King
b159517414 Merge topic 'FindwxWidgets-imported-target'
e36e455b7c FindwxWidgets: Add an imported target
42c84b1e2e ci: Add wxWidgets to Debian and Fedora base images

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8289
2023-03-09 07:37:49 -05:00
Brad King
bf3071a890 Merge topic 'use_block'
f3e85754b4 Modules:Check*: refactor: use block(SCOPE_FOR POLICIES)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8303
2023-03-09 07:36:18 -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
Brad King
fff41b8fde Merge topic 'tutorial_refactor_cmake_scripts'
e1f2b35723 Tutorial: Refactor MakeTable commands into MakeTable.cmake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8249
2023-03-09 07:34:26 -05:00