Commit Graph

29005 Commits

Author SHA1 Message Date
Brad King fdacbbf6c4 Merge topic 'file-ARCHIVE-files-dirs' into release-3.18
e9d2f06800 file(ARCHIVE*): Collapse FILES and DIRECTORY options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4955
2020-07-01 07:00:42 -04:00
Brad King c78a9ed810 Merge topic 'file-CONFIGURE-subdir' into release-3.18
141ed4e1a1 file: Fix CONFIGURE output relative path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4951
2020-06-30 08:04:07 -04:00
Craig Scott e9d2f06800 file(ARCHIVE*): Collapse FILES and DIRECTORY options
The two options were concatenated internally for both ARCHIVE_CREATE
and ARCHIVE_EXTRACT. The distinction between files and dirs was not
meaningful. Therefore, replace them with PATHS or PATTERNS 
to more accurately describe the way the options are used.

Fixes: #20884
2020-06-30 22:01:35 +10:00
Brad King 55a1572586 Merge topic 'find_library-file-readable' into release-3.18
6af95bd1e0 find_library: Check that library files are readable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4945
2020-06-30 07:25:53 -04:00
Brad King 141ed4e1a1 file: Fix CONFIGURE output relative path
In commit b16750f2d2 (file: Add CONFIGURE subcommand, 2020-03-06,
v3.18.0-rc1~584^2) we accidentally treated relative path outputs
with respect to the current working directory.  Treat them with
respect to the current binary directory instead.

Fixes: #20885
2020-06-29 09:20:42 -04:00
Brad King 6af95bd1e0 find_library: Check that library files are readable
Refactoring in commit 6b85166920 (ENH: Refactor find_library search
logic, 2008-09-22, v2.8.0~1665) dropped a call to `FileExists` on the
path under the assumption that the presence of a file in a directory
listing means it exists.  However, dropping that also dropped a check
that verifies the file is readable.  Restore the `FileExists` call to
ensure that we only find readable libraries.
2020-06-29 07:50:47 -04:00
Craig Scott 75232c3f5a file(ARCHIVE_CREATE): Rename TYPE option to COMPRESSION
Fixes: #20883
2020-06-27 18:38:28 +10:00
Brad King 1de39fac3a Merge topic 'makefile-fix-verbose' into release-3.18
7aa8311189 Makefile: Fix regression in .SILENT rule

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4928
2020-06-23 07:57:33 -04:00
Daniel Colascione 7aa8311189 Makefile: Fix regression in .SILENT rule
Since commit aa493b4bef (Makefiles: Re-implement makefile target path
escaping and quoting, 2020-04-10, v3.18.0-rc1~334^2~1), `WriteMakeRule`
now correctly escapes `$` in make target paths as `$$`.  However, this
caused an existing call site to escape the `$(VERBOSE)` variable
reference in the `.SILENT` prefix, making it ineffective.  Sub-makefiles
are invoked with `MAKESILENT`, so this bug matters only for the `all`
target, which emits progress messages from toplevel.

Before:

    # Suppress display of executed commands.
    $$(VERBOSE).SILENT:

After:

    # Suppress display of executed commands.
    $(VERBOSE).SILENT:
2020-06-22 08:48:53 -04:00
Brad King e7e18bef47 try_compile: Do not try to remove '.nfs*' files
These files are part of the NFS implementation and should not be
removed.  They will automatically disappear when NFS is done with them.

Fixes: #20844
2020-06-17 15:15:02 -04:00
Brad King 7278abde2f CMake 3.18.0-rc2 2020-06-17 09:58:40 -04:00
Raul Tambre b7a04d371f CUDA: Add issue number to Clang separable compilation error 2020-06-16 14:07:30 -04:00
Brad King ad6f2db200 Merge topic 'cuda_clang_toolkit_path' into release-3.18
6ad5c355c2 CUDA: Determine CUDA toolkit location for NVCC
4c5ad32dfa CUDA: Pass toolkit path to Clang
4d1a891fc6 FindCUDAToolkit: Avoid unnecessary temporary variable computing binary dir
6c7ed80393 FindCUDAToolkit: Remove unnecessary checks around searches
3260eb15d3 FindCUDAToolkit: Use list(SORT) to sort in natural order
6aed80d514 FindCUDAToolkit: Compute CUDAToolkit_INCLUDE_DIR instead of searching
a0f0906e26 FindCUDAToolkit: Add CUDAToolkit_LIBRARY_ROOT
8442620c33 FindCUDAToolkit: Re-unify with Internal/CUDAToolkit

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4828
2020-06-15 09:25:29 -04:00
Brad King b260600805 Merge topic 'cuda_architectures_disable' into release-3.18
55ab4c97e7 CUDA: Add support for disabling CUDA_ARCHITECTURES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4886
2020-06-15 09:24:37 -04:00
Raul Tambre 55ab4c97e7 CUDA: Add support for disabling CUDA_ARCHITECTURES
The ability to disable adding architectures completely for packaging purposes
and cases requiring passing the architectures flags explicitly has been
requested.
Support a false value for CUDA_ARCHITECTURES and CMAKE_CUDA_ARCHITECTURES
for this purpose.

Implements #20821.
2020-06-15 09:13:32 -04:00
Brad King 7ff2133110 Merge topic 'revert-find_program-exe-no-read' into release-3.18
c3fa3e166b find_program: Revert "Find programs that are executable but not readable"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4871
2020-06-15 08:58:06 -04:00
Raul Tambre 4c5ad32dfa CUDA: Pass toolkit path to Clang
Clang isn't very good at finding the installed CUDA toolkit.
The upstream recommendation is that we should pass the toolkit explicitly.

Additionally:
* Avoids Clang having to search for the toolkit on every invocation.
* Allows the user to use a toolkit from a non-standard location by simply
  setting CUDAToolkit_ROOT. The same way as with FindCUDAToolkit.

Clang wants the directory containing the device library and version.txt as the
toolkit path.
We thus pass the newly introduced CUDAToolkit_LIBRARY_ROOT as the toolkit path.

We save CUDAToolkit_ROOT_DIR and CUDAToolkit_LIBRARY_ROOT on Clang to have them
available in try_compile() and avoid unnecessary re-searching or a possibly
different installation being found in FindCUDAToolkit.
This however means that the selected toolkit can't be changed after the initial
language enablement.

We now determine CUDA compiler ID before doing actual detection, as we don't
want to spend time finding the CUDA toolkit for NVIDIA.

Implements #20754.
2020-06-12 21:50:05 +03:00
Brad King 83c8a6588b Merge topic 'vs-lang-C' into release-3.18
6241096670 VS: Restore compilation of '.C' sources as C++

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4880
2020-06-12 10:06:37 -04:00
Brad King c3fa3e166b find_program: Revert "Find programs that are executable but not readable"
The fix in commit a0173d45c6 (find_program: Find programs that are
executable but not readable, 2020-04-04, v3.18.0-rc1~372^2) can break
existing projects that were (likely accidentally) relying on the
old behavior to find files that are readable but not executable.
Revert the fix for now.  We can re-introduce it with a policy later.

Instead of reverting the test case, update it to cover the old behavior.
That can serve as a reference for testing the policy when introduced.

Fixes: #20814
Issue: #10468
2020-06-12 05:04:56 -04:00
Brad King 6241096670 VS: Restore compilation of '.C' sources as C++
Refactoring in commit edb304fa87 (VS: Simplify logic adding source file
C/C++ language flag to MSVC, 2020-05-15, v3.18.0-rc1~139^2~1) failed to
account for MSVC's treatment of `.C` extensions as C.  Add this special
case to the logic to restore use of `-TP` for `.C` extensions.

Fixes: #20822
2020-06-11 14:15:18 -04:00
Ben Boeckel afd6681f5d QCMakeCacheView: use non-deprecated List and Set constructions 2020-06-10 16:42:56 -04:00
Brad King b190ba9910 CMake 3.18.0-rc1 2020-06-09 10:58:51 -04:00
Vitaly Stakhovsky d5f4f66cb3 cmGeneratorTarget: fix misplaced header
In commit 7d1b7dc36d (Single location for cmProp typedef, 2020-05-30)
we accidentally left inclusion of `cmProperty.h` out of the main
block of includes.
2020-06-08 09:19:35 -04:00
Brad King 641b51f5c7 Merge topic 'vs-add_package_reference_install' into release-3.18
51f10f9b70 VS: Enable DOTNET_TARGET_FRAMEWORK properties all target types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4854
2020-06-08 08:03:04 -04:00
Brad King 576d0fa5b6 CUDA: Fix CUDA_ARCHITECTURES policy CMP0104 check in try_compile
Since commit 670f9c8a6d (CUDA: Add CUDA_ARCHITECTURES target property,
2020-03-12), `CMAKE_CUDA_ARCHITECTURES` is both initialized and required
by policy CMP0104's `NEW` behavior.  Inside a `try_compile` project we
use `cmake_minimum_required(VERSION ...)` with the current running
version of CMake.  Now that our version number is 3.18, `CMP0104` gets
set to `NEW` in the `try_compile`.  If the outer projects does not set
the policy then `CMAKE_CUDA_ARCHITECTURES` is not available and the
`try_compile` fails to generate.

Teach `try_compile` to check the outer project's policy status and
set policy CMP0104 to `OLD` if needed to match.

Fixes: #20794
2020-06-05 10:09:33 -04:00
Brad King 1dfd9766c6 Begin 3.18 release versioning 2020-06-05 08:33:59 -04:00
Kinan Mahdi 51f10f9b70 VS: Enable DOTNET_TARGET_FRAMEWORK properties all target types
This makes them compatible with `VS_PACKAGE_REFERENCES` and, in
particular, fixes nuget package references in combination with install
targets.

Fixes: #20764
2020-06-05 08:01:59 -04:00
Brad King fe5f1887d9 Merge topic 'reduce-try_compile'
c5a55bc4bf libarchive: Map fixed-size integer types from KWIML as typedefs
86891e00ae liblzma: Map fixed-size integer types from KWIML as typedefs
a260f0b3fd KWSys: Hard-code try_compile results on Windows
d8fba02c1c cmSystemTools: Hard-code try_compile results for Windows
c52ab69c84 libarchive: Hard-code try_compile results for bundled dependencies
89c8a9a8bc Source: Assume elf.h does not exist on Windows
aa3b329bce expat: Remove unused try_compile checks
235c7ca128 Utilities: Update hard-coded try_compile results for third-party libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4848
2020-06-05 07:58:38 -04:00
Brad King 07908dde86 Merge topic 'msbuild-utf8-enable'
bc6bf78899 VS: Use StdOutEncoding for VS 16.7 Preview 3 and above
5c6f4e6967 VS: Extract instance version from VS Installer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4847
2020-06-05 07:57:46 -04:00
Brad King 0a9f2a2bbf Merge topic 'cuda_clang_separable_error'
29eddb7b5e CUDA: Don't RunCMake generate separable compilation tests on Clang
2942924e89 CUDA: Throw error if CUDA_SEPARABLE_COMPILATION is ON when using Clang

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4827
2020-06-05 07:56:19 -04:00
Kitware Robot 20ce07ea29 CMake Nightly Date Stamp 2020-06-05 00:01:10 -04:00
Kitware Robot f48bbcbcd5 CMake Nightly Date Stamp 2020-06-04 00:01:13 -04:00
Justin Goshi bc6bf78899 VS: Use StdOutEncoding for VS 16.7 Preview 3 and above
VS 16.6 added a `StdOutEncoding` setting for custom commands to tell
MSBuild that the output is encoded as UTF-8.  In commit fd061352ab (Add
support to indicate UTF-8 custom command pipe output encoding,
2020-04-08) CMake learned to add the setting in anticipation of the VS
16.6 release.  However, when 16.6 was released it had a bug in the
implementation of custom tasks with StdOutEncoding enabled that was
exposed by our test suite.  In commit 77907931e5 (VS: Drop
StdOutEncoding with VS 16.6 pending investigation, 2020-05-29) we
disabled the setting pending investigation.

The problem is fixed in VS 16.7 Preview 3, so restore use of the
setting when a VS instance of at least that version is detected.

Fixes: #20769
2020-06-03 09:00:41 -04:00
Justin Goshi 5c6f4e6967 VS: Extract instance version from VS Installer 2020-06-03 08:58:29 -04:00
Brad King 89c8a9a8bc Source: Assume elf.h does not exist on Windows 2020-06-03 07:48:52 -04:00
Brad King 2f8d2d0ba0 Merge topic 'imported-local-target-alias'
74f0f19824 add_library/add_executable: allow local alias to imported targets
2066f6cb17 Help: add_executable: Add TOC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4837
2020-06-03 06:12:31 -04:00
Brad King e9083a74b6 Merge topic 'cpack-archive-zip-timestamps'
413742ff21 CPack: Use SOURCE_DATE_EPOCH for all timestamps in archives

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4842
2020-06-03 06:07:16 -04:00
Brad King b2b98ee3b6 Merge topic 'vs-sln-version-16'
ec685ff547 VS: Fix .sln support for VS Version Selector with VS 2019

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4844
2020-06-03 06:03:43 -04:00
Kitware Robot adad312c28 CMake Nightly Date Stamp 2020-06-03 00:01:18 -04:00
Raul Tambre 2942924e89 CUDA: Throw error if CUDA_SEPARABLE_COMPILATION is ON when using Clang
Separable compilation isn't supported yet on Clang.
Let's throw a helpful error instead of confusing errors during the build.
2020-06-02 22:09:10 +03:00
Marc Chevrier 74f0f19824 add_library/add_executable: allow local alias to imported targets
Fixes: #20641
2020-06-02 17:11:47 +02:00
Brad King ec685ff547 VS: Fix .sln support for VS Version Selector with VS 2019
VS 2019 changed the naming pattern used by 2015 and 2017.

Fixes: #20783
2020-06-02 10:30:33 -04:00
Brad King 7ce4b19bee Merge topic 'gitlab-ci-ninja-multi'
ed6cf29cf5 gitlab-ci: add a Ninja Multi-Config test job
2cc670aabd gitlab-ci: also build ncurses and Qt code on Linux
ef5685ec59 ci: install ncurses and Qt development into the Fedora 31 image
f179c1692e CursesDialog: resolve clang-tidy warnings
70c35700fc QtDialog: avoid using deprecated APIs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4832
2020-06-02 09:17:24 -04:00
Brad King 8b1a923a70 Merge topic 'getdef-expand'
7fd59dd72b cmMakefile: add GetDefExpandList() that splits value into std::vector

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4819
2020-06-02 08:02:24 -04:00
Brad King c9f1820b84 Merge topic 'cmprop'
7d1b7dc36d Single location for cmProp typedef

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4829
2020-06-02 08:00:55 -04:00
Brad King 78155da034 Merge topic 'target_link_libraries-self-link-is-an-error'
1e81e8defe target_link_libraries: self-link through ALIAS is an error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4826
2020-06-02 07:53:40 -04:00
Brad King cc2c125f52 Merge topic 'getdef-nodups'
f38fa3c021 GetDefinition: avoid duplicate calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4824
2020-06-02 07:52:14 -04:00
Ben Boeckel f179c1692e CursesDialog: resolve clang-tidy warnings
Fixes:

  - unnecessary bool expression (cmCursesMainForm)
  - removes a duplicate if/else branch (RegexExplorer)
  - collapses redundant if/else branch logic (CMakeSetupDialog and
    cmCursesStringWidget)
2020-06-02 07:37:56 -04:00
Ben Boeckel 70c35700fc QtDialog: avoid using deprecated APIs 2020-06-02 07:37:56 -04:00
Ben Stone 413742ff21 CPack: Use SOURCE_DATE_EPOCH for all timestamps in archives 2020-06-02 17:27:02 +10:00