Commit Graph

29030 Commits

Author SHA1 Message Date
Alex Turbov
915409af49 CPack: Introduce pre- and post- build actions
CPack learned the `CPACK_PRE_BUILD_SCRIPTS`, `CPACK_POST_BUILD_SCRIPTS`,
and `CPACK_PACKAGE_FILES` variables.

The first two are lists of scripts to perform
- after pre-install files into a staging directory and before
  producing the resulting packages
- after produsing the packages

The post-build script(s) also get the list of actually produced
packages in the `CPACK_PACKAGE_FILES`.

Issue: #19077
2020-06-15 11:06:41 -04:00
Brad King
268aaf4d58 Merge topic 'avoid-qt5-deprecation-warnings'
0fc1818831 QCMakeWidgets: replace QDirModel
736fb34294 QCMake: use loadRelaxed if available

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4894
2020-06-15 10:22:31 -04:00
Brad King
148a5c2d42 Merge topic 'bundle-exe-space-in-name'
d3fd518c03 find_program: Properly decode URL for bundle exe name with spaces

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4891
2020-06-15 09:36:22 -04:00
Brad King
29e9b46ca5 Merge topic 'cmake-build-retval'
b9dd072e05 Tests: Add case for cmake --build with a failing target
87c860ebad cmake --build: Fix exit code when building multiple targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4878
2020-06-15 09:26:54 -04:00
Brad King
5d710f2d11 Merge topic 'cuda_clang_toolkit_path'
ec59fb6c31 CUDA: Determine CUDA toolkit location for NVCC
0a056246a1 CUDA: Pass toolkit path to Clang
9c43972127 FindCUDAToolkit: Avoid unnecessary temporary variable computing binary dir
9eebb5b8b2 FindCUDAToolkit: Remove unnecessary checks around searches
8f01fe7bf1 FindCUDAToolkit: Use list(SORT) to sort in natural order
8c144fe9ad FindCUDAToolkit: Compute CUDAToolkit_INCLUDE_DIR instead of searching
403f8d31e3 FindCUDAToolkit: Add CUDAToolkit_LIBRARY_ROOT
6636693134 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
e366317674 Merge topic 'cuda_architectures_disable'
877a92e968 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
877a92e968 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
ca727a5ff1 Merge topic 'deprecate-policy-old'
9710790a39 Help/dev: Add maintainer guide step for initial post-release development
6f6651f728 Add deprecation warnings for policies CMP0072 and below

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4884
2020-06-15 09:00:12 -04:00
Brad King
50bb15d477 Merge topic 'revert-find_program-exe-no-read'
cc02ced530 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
Ben Boeckel
0fc1818831 QCMakeWidgets: replace QDirModel 2020-06-15 07:13:23 -04:00
Ben Boeckel
736fb34294 QCMake: use loadRelaxed if available
Added in 5.14 and load() was deprecated at the same time.
2020-06-15 07:12:49 -04:00
Craig Scott
d3fd518c03 find_program: Properly decode URL for bundle exe name with spaces
Fixes: #20817
2020-06-14 18:21:35 +10:00
Raul Tambre
0a056246a1 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
lumberyard-employee-dm
87c860ebad cmake --build: Fix exit code when building multiple targets
Updated the cmGlobalGenerator::Build method to check the return `retVal`
parameter supplied to the `cmSystemTools::RunSingleCommand` to validate
that each invocation of the build command returned an exit code of zero.

Fixes: #20790
2020-06-12 11:40:23 -04:00
Brad King
6f6651f728 Add deprecation warnings for policies CMP0072 and below
The OLD behaviors of all policies are deprecated, but only by
documentation.  Add an explicit deprecation diagnostic for policies
introduced in CMake 3.11 and below to encourage projects to port away
from setting policies to OLD.
2020-06-12 11:04:56 -04:00
Brad King
068551cfb2 Merge topic 'cmake-gui-qt5-only'
4037beb747 QtDialog: remove Qt4 definition
ce9dbceb42 QtDialog: remove Qt4-only code
8ea50749da QtDialog: use Qt5's imported targets
4ccc9921be QtDialog: use qt5 functions for special Qt sources
e4d6015460 QtDialog: remove Qt4 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4836
2020-06-12 10:11:54 -04:00
Brad King
02a82e4cd4 Merge topic 'ccmake-ncurses-init'
19689d34e6 ccmake: Display an error and interrupt execution if ncurses failed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4835
2020-06-12 10:09:11 -04:00
Brad King
81ea5eb637 Merge topic 'vs-lang-C' into release-3.18
5c04e77e07 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
5b6f08f192 Merge topic 'vs-lang-C'
5c04e77e07 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
df65a40da6 Merge topic 'gitlab-ci-more-qtdialog'
d7679f6427 QCMakeCacheView: use non-deprecated List and Set constructions
973fc56020 gitlab-ci: test QtDialog on macOS
1a995439e5 ci: add download information for Qt on macOS
881c0b86dd gitlab-ci: test QtDialog on Windows
b8d46d5e50 ci: add a script to download Qt

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4874
2020-06-12 10:05:33 -04:00
Brad King
cc02ced530 find_program: Revert "Find programs that are executable but not readable"
The fix in commit 86e6349ef7 (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
Kitware Robot
3bf6d7894a CMake Nightly Date Stamp 2020-06-12 00:01:14 -04:00
Brad King
5c04e77e07 VS: Restore compilation of '.C' sources as C++
Refactoring in commit 3b547e2e4b (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
Brad King
7925279c20 Merge topic 'add_explicit_lang_flag_to_compile_object_rule'
74b1c9fc8e Explicitly specify language flag when source LANGUAGE property is set
457170a476 CXX: Compile when possible with explicit `Cxx` language flag set
644d3b86eb C: Compile when possible with explicit `C` language flag set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4780
2020-06-11 07:47:30 -04:00
Brad King
d264270307 Merge topic 'cmake-E-compare_files-stderr'
a7d44d55ae cmake: remove -E compare_files error message if files differ

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Axel Heider <axelheider@gmx.de>
Merge-request: !4867
2020-06-11 07:46:33 -04:00
Bartosz Kosiorek
19689d34e6 ccmake: Display an error and interrupt execution if ncurses failed 2020-06-11 07:24:05 -04:00
Kitware Robot
f6710373cd CMake Nightly Date Stamp 2020-06-11 00:01:06 -04:00
Ben Boeckel
d7679f6427 QCMakeCacheView: use non-deprecated List and Set constructions 2020-06-10 16:42:56 -04:00
Asit Dhal
a7d44d55ae cmake: remove -E compare_files error message if files differ
It is not an error for the files to be different.

Fixes: #20803
2020-06-10 07:23:10 -04:00
Kitware Robot
c1b6adaedd CMake Nightly Date Stamp 2020-06-10 00:01:08 -04:00
Robert Maynard
74b1c9fc8e Explicitly specify language flag when source LANGUAGE property is set
Fixes: #14516, #20716
2020-06-09 19:41:20 -04:00
Brad King
596cfd2680 CMake 3.18.0-rc1 2020-06-09 10:58:51 -04:00
Ben Boeckel
4037beb747 QtDialog: remove Qt4 definition 2020-06-09 10:31:00 -04:00
Ben Boeckel
ce9dbceb42 QtDialog: remove Qt4-only code
The `reset()` method was actually deprecated for 5.0 which means it can
now be removed here.
2020-06-09 10:30:46 -04:00
Brad King
7d2e4730b7 Merge topic 'cmGeneratorTarget-include-cmProperty'
e65e88fbce cmGeneratorTarget: fix misplaced header

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4864
2020-06-09 09:25:54 -04:00
Brad King
4d9c42ff6d Merge topic 'cpack-extern-update-package-list'
a6e1b20bab CPack External: Introduce `CPACK_EXTERNAL_BUILT_PACKAGES`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4831
2020-06-09 09:25:19 -04:00
Kitware Robot
cfbd274f7c CMake Nightly Date Stamp 2020-06-09 00:01:29 -04:00
Vitaly Stakhovsky
e65e88fbce cmGeneratorTarget: fix misplaced header
In commit b36d1bdd9d (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
019ff154b9 Merge topic 'vs-add_package_reference_install' into release-3.18
3fd07d30bf 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
24fe87d79f Merge topic 'vs-add_package_reference_install'
3fd07d30bf 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
Kitware Robot
eec2e9b6b9 CMake Nightly Date Stamp 2020-06-08 00:01:05 -04:00
Kitware Robot
8ea392ebd6 CMake Nightly Date Stamp 2020-06-07 00:01:04 -04:00
Kitware Robot
742038e5a8 CMake Nightly Date Stamp 2020-06-06 00:01:18 -04:00
Ben Boeckel
8ea50749da QtDialog: use Qt5's imported targets 2020-06-05 11:55:56 -04:00
Ben Boeckel
4ccc9921be QtDialog: use qt5 functions for special Qt sources
Automoc is not supported in bootstrap builds, so it cannot be used
unconditionally.
2020-06-05 11:54:48 -04:00
Brad King
a4c23eb628 Merge topic 'cuda-arch-cmp0104'
5bf9a290e7 CUDA: Fix CUDA_ARCHITECTURES policy CMP0104 check in try_compile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4857
2020-06-05 11:01:16 -04:00
Brad King
5bf9a290e7 CUDA: Fix CUDA_ARCHITECTURES policy CMP0104 check in try_compile
Since commit e98588aaba (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
Alex Turbov
a6e1b20bab CPack External: Introduce CPACK_EXTERNAL_BUILT_PACKAGES
The `CPACK_EXTERNAL_PACKAGE_SCRIPT` script may set this list variable to the
full paths of generated package files. CPack copy these files from the stage
directory back to the top build directory and possibly produce checksum files
if the `CPACK_PACKAGE_CHECKSUM` is set.
2020-06-05 08:56:32 -04:00
Ben Boeckel
e4d6015460 QtDialog: remove Qt4 support 2020-06-05 08:46:40 -04:00
Brad King
21218f5c12 Begin post-3.18 development 2020-06-05 08:34:10 -04:00