Commit Graph

7886 Commits

Author SHA1 Message Date
Brad King d91c3e33cb Merge topic 'cmake_language-DEFER'
e8b0359a43 cmake_language: Add signature to DEFER calls to later times
9880549405 cmake_language: Make all errors fatal
4f33f3dcff cmake_language(CALL): Accept empty ${var} expansions
4ebe9c4ce1 cmake_language(EVAL): Factor out internal helper
78ff24a3a7 Help: Use singular placeholder name in cmake_language signature
edd60d4419 Tests: Simplify RunCMake.cmake_language invalid command cases
1a5bf8245e cmMakefile: Clarify name of internal list file run method

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5262
2020-09-30 11:55:33 -04:00
Craig Scott f002c1cfc7 Merge topic 'find-package-check-empty-version-range'
212b0afb66 find_package: raise error on empty version range

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5294
2020-09-30 08:22:49 -04:00
Brad King 1c3244ca30 Merge topic 'vs-mixed-lang-std'
b325484928 VS: Fix C language standard in target with C++ sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5295
2020-09-30 08:10:34 -04:00
Brad King 676571afe0 Merge topic 'cxx-as-objcxx'
8a2977ba55 OBJCXX: Fix regression for compiling cpp files as objcxx

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5296
2020-09-30 08:06:57 -04:00
Brad King e8b0359a43 cmake_language: Add signature to DEFER calls to later times
Fixes: #19575
2020-09-29 17:12:33 -04:00
Cristian Adam 8a2977ba55 OBJCXX: Fix regression for compiling cpp files as objcxx
In commit 8d61294c3e (PCH: Mark CMake PCH source files as -x
<lang>-header, 2020-09-04, v3.18.3~14^2) we removed the explicit `-x
objective-c++` flag.  This broke cases with custom source extensions.

Restore the explicit `-x objective-c[++]` flag and put it before the
`<FLAGS>` placeholder.  The latter will contain the proper `-x
objective-c[++]-header` value and will override the `-x objective-c[++]`
value set before.

Fixes: #21234
2020-09-29 12:35:49 -04:00
Brad King 4f33f3dcff cmake_language(CALL): Accept empty ${var} expansions
Factor out an internal helper.  Generalize partial argument expansion
and call the helper on a clean boundary between raw arguments.
2020-09-29 10:00:24 -04:00
Kyle Edwards af048185b1 Merge topic 'cmake-gui-environment'
85f5009d27 CMake GUI: Add environment editor
d6c051c126 Tests: Add some basic configure tests for the CMake GUI
7cd95d9996 Tests: Add CatchShow helper for CMake GUI tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5270
2020-09-29 09:51:22 -04:00
Brad King b325484928 VS: Fix C language standard in target with C++ sources
Add C-language standard to target-wide C++ settings.

Fixes: #21195
2020-09-29 07:26:36 -04:00
Marc Chevrier 212b0afb66 find_package: raise error on empty version range 2020-09-29 13:06:09 +02:00
Brad King edd60d4419 Tests: Simplify RunCMake.cmake_language invalid command cases 2020-09-29 06:24:51 -04:00
Brad King 1382002ae2 Merge topic 'ctest_launch_report_make_errors'
a8b7dd061b ctest: improve Unicode support for launchers
ab9ad2a6a0 ctest: report make-level errors to CDash when using launchers
56e4e942d2 ctest: split launcher XML writer into separate class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Zack Galbreath <zack.galbreath@kitware.com>
Merge-request: !5266
2020-09-29 05:51:25 -04:00
Brad King a456dd6c26 Merge topic 'system_include_dir_caching_pre_lang'
b6418155f3 cmGeneratorTarget: Include Cache now occurs per language+config

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5274
2020-09-29 05:48:11 -04:00
Zack Galbreath ab9ad2a6a0 ctest: report make-level errors to CDash when using launchers
Fixes: #19545
2020-09-28 13:13:52 -04:00
Kyle Edwards 85f5009d27 CMake GUI: Add environment editor 2020-09-28 09:46:35 -04:00
Kyle Edwards d6c051c126 Tests: Add some basic configure tests for the CMake GUI 2020-09-28 09:46:35 -04:00
Kyle Edwards 7cd95d9996 Tests: Add CatchShow helper for CMake GUI tests 2020-09-28 09:46:35 -04:00
Brad King c442c59757 Merge topic 'xcode-restore-ios-tests'
2092ab08fe xcode: conditionally enable combined install tests
62ce9e16e0 xcode: annotate test output with selected SDK

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5271
2020-09-28 08:41:47 -04:00
Robert Maynard b6418155f3 cmGeneratorTarget: Include Cache now occurs per language+config
Previously only occurred per config which broke per-language
system includes.
2020-09-25 14:00:06 -04:00
Gregor Jasny 2092ab08fe xcode: conditionally enable combined install tests
The new Xcode 12 build system does not support recursive
invocation. Therefore lazily triggered builds for the
corresponding platform which run during the `install` target
fail with:

```
error: unable to attach DB: error: accessing build database
```

While looking for a work-around we conditionally disable those
tests.

Issue: #21206
2020-09-25 09:38:30 +02:00
Gregor Jasny 62ce9e16e0 xcode: annotate test output with selected SDK 2020-09-25 09:30:17 +02:00
Raul Tambre c63fe01835 CUDA: Clang separable compilation
For NVCC the compiler takes care of device linking when passed the "-dlink"
flag.
Clang doesn't support such magic and requires the buildsystem to do the work
that NVCC does behind the scenes.

The implementation is based on Bazel's device linking documentation:
https://github.com/tensorflow/tensorflow/blob/7cabcdf073abad8c46e9dda62bb8fa4682d2061e/third_party/nccl/build_defs.bzl.tpl#L259

Closes: #20726
2020-09-24 15:19:54 -04:00
Brad King 0ff74958f4 Merge topic 'cmake-gui-tests'
1dcc569828 gitlab-ci: Add GUI testing to each OS
4c6e5cd0fa Tests: Add some basic tests for CMake GUI
41e223deb3 CMake GUI: Split up into libraries, add test shim
b7995b62f0 QCMakeCacheView: Default to nullptr for parent

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5224
2020-09-24 15:15:19 -04:00
Brad King 4ae8cc7f0b Merge topic 'proper_device_libraries_architecture'
1cd4a37c12 Tests: Use sm_35 in Cuda.ProperDeviceLibraries for CUDA <10.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5261
2020-09-24 15:14:18 -04:00
Brad King 7b38161ca1 Merge topic 'check-source-modules'
357e2ef429 CheckSoureRuns: Add a unified way to check if a source runs
10ae907de0 CheckSoureCompiles: Add a unified way to check if a source compiles
f5c928f73c Add a test to verify '\' handling in CHECK_CXX_SOURCE_COMPILES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Michael Hirsch, Ph.D. <michael@scivision.dev>
Merge-request: !5223
2020-09-24 15:12:59 -04:00
Brad King 9aa93937f9 Merge topic 'obj-lib-per-config-source'
2f76e7429b OBJECT libraries: Properly recognize if sources depend on configuration
d575ecc9de cmGeneratorTarget: Better name for internal variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5252
2020-09-24 15:10:04 -04:00
Craig Scott ac5195c408 Merge topic 'find_package-version-range'
5b3356263c CMakePackageConfigHelpers: Add version range support
6bfc442fde FPHSA: add support of version range
d7df81067b find_package: Add support of version range
09095dbcd2 cmFindPackageCommand: Refactoring

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Michael Hirsch, Ph.D. <michael@scivision.dev>
Merge-request: !5226
2020-09-24 07:29:03 -04:00
Raul Tambre 1cd4a37c12 Tests: Use sm_35 in Cuda.ProperDeviceLibraries for CUDA <10.0
Using the cublas device libraries seems to require at least sm_35.
Set the architecture explicitly to sm_35 for old CUDA versions, which still
have the cublas device library.
2020-09-23 21:29:21 +03:00
Kyle Edwards 4c6e5cd0fa Tests: Add some basic tests for CMake GUI 2020-09-23 14:10:40 -04:00
Robert Maynard 357e2ef429 CheckSoureRuns: Add a unified way to check if a source runs 2020-09-23 12:28:37 -04:00
Robert Maynard 10ae907de0 CheckSoureCompiles: Add a unified way to check if a source compiles 2020-09-23 12:28:37 -04:00
Robert Maynard f5c928f73c Add a test to verify '\' handling in CHECK_CXX_SOURCE_COMPILES 2020-09-23 12:05:39 -04:00
Brad King d827fdb6f9 Merge topic 'separate_arguments-program'
d832c1cc7d separate_arguments: add option PROGRAM
f4c21d4953 separate_arguments: refactoring

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5253
2020-09-23 12:05:26 -04:00
Brad King a41f375e65 Merge topic 'test-issue-21144'
e02f677f61 Tests: Add test for early source lookup of file(GENERATE)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5248
2020-09-23 12:04:37 -04:00
Brad King 869d6c82a0 Merge topic 'install-EXPORT-source-CONFIG'
bf114602da install(EXPORT): Fix exporting target w/ source named using CONFIG genex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5240
2020-09-23 11:58:02 -04:00
Brad King 226f6bc615 Merge topic 'cuda_tests_architecture'
4fe9f534f5 Tests: Don't unnecessarily set CUDA_ARCHITECTURES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5246
2020-09-23 11:56:34 -04:00
Deniz Bahadir 2f76e7429b OBJECT libraries: Properly recognize if sources depend on configuration
Fixes: #21198
2020-09-23 10:05:55 -04:00
Brad King f2daa025e3 {get,set}_property: Add support for referencing binary directories
Index directories by their binary directory path in addition to their
source directory path.

Fixes: #19262
2020-09-23 09:25:42 -04:00
Marc Chevrier 5b3356263c CMakePackageConfigHelpers: Add version range support 2020-09-23 12:52:25 +02:00
Marc Chevier 6bfc442fde FPHSA: add support of version range 2020-09-23 12:52:25 +02:00
Marc Chevier d7df81067b find_package: Add support of version range
This enhancement is the first step for solving issue #21107
2020-09-23 12:52:25 +02:00
Marc Chevrier d832c1cc7d separate_arguments: add option PROGRAM
Fixes: #21217
2020-09-22 16:32:34 +02:00
Marc Chevrier f4c21d4953 separate_arguments: refactoring 2020-09-22 16:32:34 +02:00
Brad King 44c5f5d4ec Merge topic 'cmake_path-updates'
82c9508313 cmake_path: enhancements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5245
2020-09-22 08:03:51 -04:00
Brad King 966c3263c2 Merge topic 'file-ARCHIVE-compression-level'
195d14e781 file(ARCHIVE_CREATE): Add option to control compression level

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Merge-request: !5242
2020-09-22 07:43:31 -04:00
Deniz Bahadir bf114602da install(EXPORT): Fix exporting target w/ source named using CONFIG genex
Fixes: #21203
2020-09-22 07:35:02 -04:00
Josef Angstenberger e02f677f61 Tests: Add test for early source lookup of file(GENERATE)
The output file structures of file(GENERATE) have to be created early to
be able to use the generated files in source lists.

This was not done correctly for subdirectories which has been fixed
in commit aee2c51224 (file(GENERATE): Create output file structures for
all directories first, 2020-09-10).

Add a test case to address issue #21144.
2020-09-21 23:02:08 +02:00
Raul Tambre 4fe9f534f5 Tests: Don't unnecessarily set CUDA_ARCHITECTURES
Architecture 30 was removed with CUDA 11, so most of the CUDA tests fail with
it.
Remove setting the architecture and bump the minimum version to 3.18, so
CMP0104 takes effect and we can rely on the default architecture, which is
guaranteed to be compilable.

Use of __ldg() in ProperLinkFlags was removed as it only affects performance
and is available only on sm_35 and above.

Testing the functionality of CUDA_ARCHITECTURES is already covered by
CudaOnly.Architecture and CudaOnly.CompileFlags.
2020-09-21 20:37:07 +03:00
Asit Dhal 195d14e781 file(ARCHIVE_CREATE): Add option to control compression level
Fixes: #21125
2020-09-21 13:08:11 -04:00
Brad King 64901e053b Merge topic 'xcode-12-new-build-system'
b8ecd4df5f ExternalProject: Use CMP0114 NEW behavior with Xcode "new build system"
fe258f6382 Tests: Skip RunCMake.XcodeProject device cases for Xcode "new build system"
1c3d2d0951 Tests: Skip Qt*Autogen.MocSkipSource case for Xcode "new build system"
542884e527 Tests: Update RunCMake.XcodeProject cases for Xcode "new build system"
832a78be2d Tests: Update BuildDepends test for Xcode "new build system"
ff76c51ec3 Tests: Update RunCMake.file case with workaround for Xcode "new build system"
1806cdd17c Tests: Avoid duplicate custom commands for Xcode "new build system"
8d5f4c4db9 Xcode: Switch to the "new build system" for Xcode 12 and above
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5229
2020-09-21 09:10:48 -04:00