Commit Graph

13186 Commits

Author SHA1 Message Date
Brad King
5f74e19abb Merge topic 'doc_varreq'
9e1b30121f Help:toolchain: refer to CheckSourceCompiles
cf48022dc5 Help:Check*: include CMAKE_REQUIRED_* vars to dedupe

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8300
2023-03-16 09:06:04 -04:00
Brad King
d34c98b06a Merge topic 'iar-improve-asm'
21f19d6af7 IAR:Improved assembler support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8323
2023-03-15 09:53:16 -04:00
scivision
cf48022dc5 Help:Check*: include CMAKE_REQUIRED_* vars to dedupe
CMAKE_REQUIRED_FLAGS now notes that space-delimited string, not
;-list is required, which could be surprising compared to similar
options that do use ;-list
2023-03-14 16:48:25 -04:00
Brad King
6f7d21b452 Merge topic 'incneed'
03c6ebf2b5 Modules:Check,GenerateExportHeader: include only what's needed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8311
2023-03-14 09:37:17 -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
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
Joakim Lönnberg
21f19d6af7 IAR:Improved assembler support 2023-03-14 10:14:26 +01: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
scivision
03c6ebf2b5 Modules:Check,GenerateExportHeader: include only what's needed
GenerateExportHeader had a hidden state requirement that other
modules were included first. Considering include_guard, Modules
should include all they actually use.
2023-03-13 10:36:09 -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
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
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
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
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
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
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
CheesyNacho10
e36e455b7c FindwxWidgets: Add an imported target 2023-03-08 16:39:38 -05:00
scivision
f3e85754b4
Modules:Check*: refactor: use block(SCOPE_FOR POLICIES) 2023-03-08 14:07:55 -05:00
Brad King
f80413ccc4 Merge topic 'findmatlab'
103dbb2fd2 FindMatlab: Windows -wait is only for -r, not -batch
1932ae0284 FindMatlab: refactor: use string(APPEND
c4cacdc7eb FindMatlab: use modern foreach()
af05544c49 FindMatlab: document function input/output
257a3e870e FindMatlab: add Matlab_VERSION and document.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8286
2023-03-08 09:01:46 -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
scivision
103dbb2fd2
FindMatlab: Windows -wait is only for -r, not -batch 2023-03-07 15:34:36 -05:00
scivision
1932ae0284
FindMatlab: refactor: use string(APPEND 2023-03-07 15:34:36 -05:00
scivision
c4cacdc7eb
FindMatlab: use modern foreach()
remove unused superseded commented code
2023-03-07 15:34:35 -05:00
scivision
af05544c49
FindMatlab: document function input/output 2023-03-07 15:34:35 -05:00
scivision
257a3e870e
FindMatlab: add Matlab_VERSION and document.
fixes #24569
2023-03-07 15:32:56 -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
Robert Maynard
21b102c77d FindCUDAToolkit: Add support for finding Tegra cudla library
Fixes #24575
2023-03-07 13:47:16 -05:00
Brad King
617b8df7cf Merge topic 'clang-16-cxx-modules'
3fe8e33f27 Clang: Record Clang 16.0 flags for our experimental C++ modules support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !8285
2023-03-06 08:59:21 -05:00
Brad King
5f4dad37f0 Merge topic 'clang-16-cxx-modules' into release-3.26
3fe8e33f27 Clang: Record Clang 16.0 flags for our experimental C++ modules support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !8285
2023-03-06 08:59:20 -05:00
Brad King
5613d7ed9f Merge topic 'GoogleTest-type-param-suite'
9aa9032266 GoogleTest: Restore suite name for type-parametrized tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8282
2023-03-06 08:53:41 -05:00
Brad King
9c181ad470 Merge topic 'GoogleTest-type-param-suite' into release-3.26
9aa9032266 GoogleTest: Restore suite name for type-parametrized tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8282
2023-03-06 08:53:40 -05:00
Brad King
3fe8e33f27 Clang: Record Clang 16.0 flags for our experimental C++ modules support
LLVM/Clang 16.0 now contains official support for what CMake needs.
2023-03-03 12:44:53 -05:00
Brad King
9aa9032266 GoogleTest: Restore suite name for type-parametrized tests
Fix a regression from commit 073dd1bd81 (GoogleTest: Change format for
typed tests, 2022-02-07, v3.23.0-rc1~4^2) in the suite name detection.

Co-authored-by: Evgeniy Shcherbina <ixsci@pm.me>
Fixes: #24563
2023-03-03 10:38:02 -05:00
Brad King
697ca5d51c Merge topic 'ExternalProject-revert-install'
771387523a ExternalProject: Restore driving install through build system

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Craig Scott <craig.scott@crascit.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8279
2023-03-03 09:22:46 -05:00
Brad King
cb1b95886b Merge topic 'ExternalProject-revert-install' into release-3.26
771387523a ExternalProject: Restore driving install through build system

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Craig Scott <craig.scott@crascit.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8279
2023-03-03 09:22:45 -05:00
Brad King
771387523a ExternalProject: Restore driving install through build system
Revert commit 66b5d51f38 (ExternalProject: Install CMake projects
using 'cmake --install', 2022-09-08, v3.25.0-rc1~150^2).
It changed the ExternalProject install step command from:

    cmake --build <dir> --target install --config <cfg>

to:

    cmake --install <dir> --config <cfg>

The latter command no longer runs the external project build system
during the install step.  We could consider using the commands:

    cmake --build <dir> --target all --config <cfg>
    cmake --install <dir> --config <cfg>

as the install step, but if `CMAKE_SKIP_INSTALL_ALL_DEPENDENCY` is
used in the external project, that can change semantics too.

Revert the original change pending further investigation on other ways
to support its motivating use case.  Add a test covering the
previously-regressed use case.

Fixes: #24567
Issue: #23946
2023-03-02 14:28:26 -05:00
Brad King
3c7e486785 Merge topic 'retry-file-download-on-timeout'
296d2bef06 ExternalProject: Also retry curl download on timeout error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8270
2023-03-02 10:01:43 -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
Brad King
d7df908fc5 Merge topic 'FindPython-fix-CMAKE_SHARED_LIBRARY_SUFFIX-matching'
764441e672 FindPython: fix erroneous ${CMAKE_SHARED_LIBRARY_SUFFIX} matching

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8271
2023-03-01 09:35:42 -05:00
Greg Thain
296d2bef06 ExternalProject: Also retry curl download on timeout error
Since commit f24e34975a (ExternalProject: retry download on recoverable
errors, 2020-08-08, v3.19.0-rc1~298^2~1) ExternalProject has a list of
curl errors which trigger a retry today: 6, 7, 8 and 15.

Add curl error 28.  It is a "timeout error", and should also trigger a
retry attempt at a download of an external project.  The complete list
of curl errors is https://curl.se/libcurl/c/libcurl-errors.html
2023-03-01 09:31:04 -05:00
Brad King
882abea3d8 Merge topic 'FindVulkan-mingw-cross-compiling'
829f1b5be4 FindVulkan: Add more search paths for MINGW when cross compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8256
2023-03-01 09:22:53 -05:00
Marc Chevrier
764441e672 FindPython: fix erroneous ${CMAKE_SHARED_LIBRARY_SUFFIX} matching
Fixes: #24556
2023-03-01 12:34:13 +01: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
Brad King
2e469212c8 Dart,FindDart: Add policy to remove these modules
These modules and the "DART" tool they support have long been replaced
by CTest.
2023-02-28 08:43:45 -05:00
Ralf Habacker
829f1b5be4 FindVulkan: Add more search paths for MINGW when cross compiling
Fixes: #24536
2023-02-28 08:32:01 +01:00
Ben Boeckel
0cca309dfd FindX11: support the xcb-{cursor,shape,xrm} components
Fixes: #24417
2023-02-27 17:40:48 -05:00
Craig Scott
57f09a818c Merge topic 'fetchcontent-reject-CMAKE_TOOLCHAIN_FILE-env-var'
c15674a9cb FetchContent: Reject CMAKE_TOOLCHAIN_FILE env var in sub-build
31ef93f19f FetchContent: Only use @-@ replacements for sub-build CMakeLists.txt

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8248
2023-02-25 17:16:37 -05:00
Brad King
d6831f99fa Merge topic 'FetchContent-generator-instance'
9af0e67ee5 FetchContent: Relay CMAKE_GENERATOR_INSTANCE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8195
2023-02-24 08:36:25 -05:00