Commit Graph

2265 Commits

Author SHA1 Message Date
Raul Tambre
440dc98b07 CUDA: Clang CUDA 11.1 support
version.txt is gone from CUDA 11.1 installations, but the rest is the same.
Instead of looking for version.txt look for <CUDA path>/nvvm/libdevice, which
is the main thing that Clang requires (though it also checks for the existence
of bin and include).

Fixes #21353.
2020-11-22 11:30:01 +02:00
Brad King
30aa715fac Revert "specify language flag when source LANGUAGE property is set"
Revert commit 74b1c9fc8e (Explicitly specify language flag when source
LANGUAGE property is set, 2020-06-01, v3.19.0-rc1~722^2) and the lookup
tables from its two immediate ancestors.  The purpose of that change was
to convert an explicit `LANGUAGE` source file property into an explicit
language specification compiler flag like `-x c`.  This seems reasonable
since the property is documented as meaning "indicate what programming
language the source file is".  It is also needed to help compilers deal
with non-standard source file extensions they don't recognize.

However, some projects have been setting `LANGUAGE C` on `.S` assembler
source files to mean "use the C compiler".  Passing `-x c` for them
breaks the build because the `.S` sources are not written in C.  These
projects should be updated to use `enable_language(ASM)`, for which
CMake often chooses the C compiler as the assembler when using
toolchains that support it (which would have to be the case for projects
using the approach).

Revert the change for now to preserve the old behavior for such projects.
We can re-introduce it with a policy in a future version of CMake.

Fixes: #21469
Issue: #14516, #20716
2020-11-19 17:06:03 -05:00
Marc Chevrier
1c912056a1 cmake_path: remove new command from 3.19
Defer adding this command until post-3.19 development so that it
has more time to mature before being included in a release.

Issue: #21385
2020-11-03 09:55:35 -05:00
Brad King
0832516bec Help: Add 3.19 release note about CUDA support on QNX 2020-11-02 09:39:36 -05:00
Craig Scott
95c14579f2 Help: Cleanup typos and grammar for the 3.19 release 2020-10-24 22:58:42 +11:00
Brad King
5c3a91c808 CMP0111: Clarify that the new error is on a missing property setting
The previous wording could be confused with the file missing on disk.
2020-10-16 08:26:00 -04:00
Marc Chevrier
5772ca0a53 FindPython: Ensure Apple Xcode python 3 is usable
The python 3 distributed as part of Xcode requires the specification
of a 'rpath' pointing at frameowrks root for a correct execution.

Fixes: #21293
2020-10-12 15:45:55 +02:00
Brad King
b16eb7c76d Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2020-10-08 11:22:38 -04:00
Brad King
1b6c0b375e Help: Organize and revise 3.19 release notes
Add section headers similar to the 3.18 release notes and move each
individual bullet into an appropriate section.  Revise a few bullets.
2020-10-08 09:30:25 -04:00
Brad King
b81cb27f20 Help: Consolidate 3.19 release notes
Run the `Utilities/Release/consolidate-relnotes.bash` script to move
notes from `Help/release/dev/*` into `Help/release/3.19.rst`.
2020-10-08 09:30:25 -04:00
Robert Maynard
5c66ac31e6 CUDA: CheckLinkerFlag now supports CUDA 2020-10-08 08:30:59 -04:00
Robert Maynard
da2622ff36 CUDA: Add Support to SourceCompiles|Runs and CheckCompilerFlags 2020-10-08 08:30:59 -04:00
Brad King
c61f820a7f Merge topic 'add_ispc_to_check_helpers'
e17e2c6a51 ISPC: CheckCompilerFlags and CheckSourceCompiles support ISPC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5337
2020-10-07 07:13:21 -04:00
Kyle Edwards
6e10518cbc Help: Add IDE integration guide 2020-10-06 11:54:12 -04:00
Robert Maynard
e17e2c6a51 ISPC: CheckCompilerFlags and CheckSourceCompiles support ISPC 2020-10-06 10:47:20 -04:00
Kyle Edwards
1d25760198 Help: Add presets documentation and release notes 2020-10-05 09:49:59 -04:00
Raul Tambre
079ea66468 CMakeDetermineCompilerABI: Handle NVCC-style -Werror flags
NVCC doesn't require an equals sign for its -Werror flags.

Fixes #21265.
2020-10-04 09:09:21 +03:00
Brad King
3ec0f9d620 Merge topic 'UseSWIG-output-source-file-properties'
4a81a0ce3d UseSWIG: Add OUTPUT_DIR and OUTFILE_DIR source file properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5303
2020-10-02 09:55:26 -04:00
Brad King
a64c779746 Merge topic 'execute_process-fatal-error'
116a427eb1 execute_process: add options for fatal errors on subprocess failure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5243
2020-10-02 08:38:53 -04:00
Craig Scott
468bcc3291 Merge topic 'FindSWIG-version-range'
1d300ee2a9 FindSWIG: Add version range support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5306
2020-10-02 06:58:13 -04:00
Asit Dhal
116a427eb1 execute_process: add options for fatal errors on subprocess failure
Fixes: #19930
2020-10-01 17:07:44 +02:00
Brad King
436b57ccb2 Merge topic 'genexpr-for-mfc-flag'
c1f1eaf7a4 VS: Teach CMAKE_MFC_FLAG to support generator expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5283
2020-10-01 07:59:33 -04:00
Craig Scott
431f1183ef Merge topic 'FindPython-version_range'
e4b7049230 FindPython: Add version range support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5265
2020-10-01 07:43:38 -04:00
Marc Chevrier
1d300ee2a9 FindSWIG: Add version range support 2020-10-01 12:00:29 +02:00
Marc Chevrier
4a81a0ce3d UseSWIG: Add OUTPUT_DIR and OUTFILE_DIR source file properties
These properties enable to manage output directories on
per source file basis.

Fixes: #21250
2020-09-30 19:19:14 +02:00
Andrey Starodubtsev
c1f1eaf7a4 VS: Teach CMAKE_MFC_FLAG to support generator expressions 2020-09-30 12:24:13 -04:00
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
Marc Chevrier
e4b7049230 FindPython: Add version range support
Fixes: #21107
2020-09-30 14:30:23 +02:00
Brad King
e8b0359a43 cmake_language: Add signature to DEFER calls to later times
Fixes: #19575
2020-09-29 17:12:33 -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
0021d24fb3 Merge topic 'add_lang_agnostic_check_compile_flag_module'
90dead024c CheckCompilerFlag: unified way to check compiler flags per language

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5281
2020-09-29 05:45:07 -04:00
Kyle Edwards
85f5009d27 CMake GUI: Add environment editor 2020-09-28 09:46:35 -04:00
Robert Maynard
90dead024c CheckCompilerFlag: unified way to check compiler flags per language 2020-09-28 09:07:54 -04: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:
7cabcdf073/third_party/nccl/build_defs.bzl.tpl (L259)

Closes: #20726
2020-09-24 15:19:54 -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
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
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
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
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
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
Brad King
cedc0a0329 Merge topic 'findcudatoolkit_cross_scattered'
9d3f7872e1 FindCUDAToolkit: Support scattered installations when crosscompiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5247
2020-09-22 07:40:34 -04: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
Raul Tambre
9d3f7872e1 FindCUDAToolkit: Support scattered installations when crosscompiling
Previously when CMAKE_CROSSCOMPILING was ON we'd end up not setting the target
directory if the non-scattered one didn't exist.
Fix this by assuming a scattered installation if the target directory isn't set
after the crosscompiling logic.

This is the same fix as commit 2c0d5d01ee (CUDA: Support scattered
installations when crosscompiling with Clang, 2020-09-14).
2020-09-20 17:35:12 +03:00
Brad King
8d5f4c4db9 Xcode: Switch to the "new build system" for Xcode 12 and above
Provide an option to switch back to the original build system via
`-T buildsystem=1`.

Fixes: #18088
2020-09-18 13:02:14 -04:00