Commit Graph

29072 Commits

Author SHA1 Message Date
Brad King
81399d5438 Merge topic 'refactor_language_mapping_logic'
c4e890946a try_compile: consistently add language properties
0e16da8233 cmCoreTryCompile use anonymous namespace instead of static

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4895
2020-06-23 08:13:16 -04:00
Brad King
a84c85310c Merge topic 'graphviz-cycles'
ee5eb2eab4 Graphviz: add missing support for circular dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4926
2020-06-23 08:12:23 -04:00
Brad King
63382b5277 Merge topic 'makefile-fix-verbose'
7f78bc42cb Makefile: Fix regression in .SILENT rule

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4928
2020-06-23 07:57:33 -04:00
Kitware Robot
ee5893c10e CMake Nightly Date Stamp 2020-06-23 00:02:37 -04:00
Daniel Colascione
7f78bc42cb Makefile: Fix regression in .SILENT rule
Since commit d74e651b78 (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
Robert Maynard
c4e890946a try_compile: consistently add language properties
It was very easy to forgot to add all the possible language
properties that try_compile might need. Refactored the code
to make it harder to skip flags.

This changes adds the missing language properties for
the CUDA, Fortran, OBJC, OBJCXX, and Swift languages:

- CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN
- CMAKE_<LANG>_COMPILER_TARGET
- CMAKE_<LANG>_LINK_NO_PIE_SUPPORTED
- CMAKE_<LANG>_PIE_SUPPORTED
2020-06-22 08:37:44 -04:00
Kitware Robot
9692931f83 CMake Nightly Date Stamp 2020-06-22 00:02:06 -04:00
Corentin Plouet
ee5eb2eab4 Graphviz: add missing support for circular dependencies
This support was actually added by removing a superfluous check that was
too eager in cmLinkItemGraphVisitor.cxx.

Extended the existing Graphviz tests to include this particular case,
and re-generated the expected output files.

Fixes: #20720
2020-06-22 01:17:19 +10:00
Kitware Robot
71f6c7badf CMake Nightly Date Stamp 2020-06-21 00:02:53 -04:00
Kitware Robot
eae0c0afbb CMake Nightly Date Stamp 2020-06-20 00:02:46 -04:00
Brad King
6f7853cb42 Merge topic 'get_filename_component-error-fatal'
470b3a76b3 get_filename_component: make errors fatal

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4914
2020-06-19 08:17:12 -04:00
Brad King
d736b2ef3a Merge topic 'test-extra-generators'
ab6e1e49c0 Tests: Simplify addition of extra generator tests
882483192d cmake: Simplify internal conditions for adding extra generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4909
2020-06-19 08:15:59 -04:00
Brad King
43e8db481b Merge topic 'try_compile-nfs'
a9a258c302 try_compile: Do not try to remove '.nfs*' files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Acked-by: Axel Huebl <axel.huebl@plasma.ninja>
Merge-request: !4913
2020-06-19 08:14:05 -04:00
Kitware Robot
c0a9fc1dd6 CMake Nightly Date Stamp 2020-06-19 00:02:46 -04:00
Robert Maynard
0e16da8233 cmCoreTryCompile use anonymous namespace instead of static 2020-06-18 14:44:02 -04:00
Asit Dhal
470b3a76b3 get_filename_component: make errors fatal
Make all errors in `get_filename_component` fatal.

Fixes: #20015
2020-06-18 10:01:45 -04:00
Brad King
0a7a4665be Merge topic 'xcode-link-libs'
58c05e1c73 Xcode: Use "Link Binary With Libraries" build phase when possible
927373b678 Xcode: Refactor generator variable names and types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4882
2020-06-18 09:51:35 -04:00
Brad King
e0b21ad924 Merge topic 'languageStandardRefactor'
742ff97f80 Refactor language standard computation
0892c798f7 cmMakefile: Change CompileFeatureKnown to take target name instead of target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4803
2020-06-18 09:47:41 -04:00
Brad King
2399be054b Merge topic 'configure_file-error-handling'
032506acc6 cmake: implement error handling in configure_file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4889
2020-06-18 09:43:13 -04:00
Brad King
96602aeee2 Merge topic 'refactor_try_compile_parsing'
574f71efba try_compile: Refactor language standard level parsing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4900
2020-06-18 09:39:54 -04:00
Kitware Robot
61aa9128c3 CMake Nightly Date Stamp 2020-06-18 00:02:13 -04:00
Brad King
a9a258c302 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
e66fe75792 CMake 3.18.0-rc2 2020-06-17 09:58:40 -04:00
Brad King
882483192d cmake: Simplify internal conditions for adding extra generators
They are always present except in the bootstrap `cmake`.
2020-06-17 06:55:30 -04:00
Brad King
55ade79ab8 Merge topic 'cuda_clang_limitations'
bdb105ee94 Help: Mention CUDA Clang limitations in 3.18 release notes
fec7dd33d3 CUDA: Add issue number to Clang separable compilation error
14163d7d6b CUDA: Throw error for Clang on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4903
2020-06-17 06:44:25 -04:00
Gusts Kaksis
58c05e1c73 Xcode: Use "Link Binary With Libraries" build phase when possible
Try linking all target linked libraries through frameworks build phase
instead of linker flags, thus letting Xcode manage build product paths
correctly.  Prevent adding duplicate entries to "Link Binary With
Libraries" build phase.

Add check for configuration-dependent linking - in case the library is
not present in all configurations revert back to linker flags which are
per-configuration.

This does change the order of libraries linked, but that does not seem
to matter for Apple linkers invoked by Xcode, even for static libraries.
The linker will go back and re-consider a static library from earlier
on the link line when more symbols from its objects are needed.

Fixes: #14185
2020-06-17 06:35:25 -04:00
Robert Maynard
574f71efba try_compile: Refactor language standard level parsing
cmCoreTryCompile had significant code duplication around handling
languages that offer standard levels. This refactoring reduces
the complexity and makes it easier to add new languages in the
future.
2020-06-17 06:30:39 -04:00
Kitware Robot
e96b5e4449 CMake Nightly Date Stamp 2020-06-17 00:03:25 -04:00
Asit Dhal
032506acc6 cmake: implement error handling in configure_file
Implement error handling in case it fails

Fixes: #20696
2020-06-17 05:22:34 +02:00
Justin Goshi
742ff97f80 Refactor language standard computation
Instead of mutating the configure-time cmTarget's properties at generate
time, compute and store it in a cmGeneratorTarget field.
2020-06-16 16:32:34 -07:00
Raul Tambre
fec7dd33d3 CUDA: Add issue number to Clang separable compilation error 2020-06-16 14:07:30 -04:00
Brad King
158c6511e0 Merge topic 'cmake-E-compare_files-exit-code'
b5b6075522 cmake: add dedicated error for -E compare_files invalid arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4881
2020-06-16 09:09:32 -04:00
Brad King
f2c1debe40 Merge topic 'cpack-pre-and-post-scripts'
915409af49 CPack: Introduce pre- and post- build actions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4846
2020-06-16 09:08:01 -04:00
Brad King
8d5eb04e85 Merge topic 'find_program-exe-no-read'
9d45a8be08 find_program: Find programs that are executable but not readable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4896
2020-06-16 09:05:52 -04:00
Kitware Robot
7787c6f7c0 CMake Nightly Date Stamp 2020-06-16 06:08:44 -04:00
Asit Dhal
b5b6075522 cmake: add dedicated error for -E compare_files invalid arguments
Return 2 when user provides invalid arguments

Fixes: #20815
2020-06-15 12:39:37 -04:00
Brad King
9d45a8be08 find_program: Find programs that are executable but not readable
This fix was first made by commit 86e6349ef7 (find_program: Find
programs that are executable but not readable, 2020-04-04,
v3.18.0-rc1~372^2) but was reverted for compatibility.  Re-introduce it
with a policy for compatibility.

Fixes: #10468
2020-06-15 11:58:47 -04:00
Justin Goshi
0892c798f7 cmMakefile: Change CompileFeatureKnown to take target name instead of target
The implementation needs only the target name.
2020-06-15 11:31:03 -04:00
Gusts Kaksis
927373b678 Xcode: Refactor generator variable names and types
* Instead of `classes` use name `commonSourceFiles`.
* No need for reference when you have pointer.
2020-06-15 11:20:32 -04:00
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
7fa5ea130b Merge topic 'cuda_clang_toolkit_path' into release-3.18
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
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
a3881d6313 Merge topic 'cuda_architectures_disable' into release-3.18
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
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
05546d695e Merge topic 'revert-find_program-exe-no-read' into release-3.18
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