Commit Graph

4823 Commits

Author SHA1 Message Date
Brad King
da7ad7997e WriteCompilerDetectionHeader: Add policy to remove module
See justification in the policy documentation.

Closes: #17842
2020-12-05 21:57:08 +11:00
Brad King
541f1410e0 Help: Move Documentation module to list of deprecated modules
The module has been deprecated since commit 306a1ba960
(Modules/Documentation: remove, 2020-04-16, v3.18.0-rc1~290^2).
2020-12-04 10:52:03 -05:00
Brad King
76685b985d Merge topic 'explicit-LANGUAGE-flag'
48aac247e9 Compile with explicit language flag when source LANGUAGE property is set
2e67a75acd Embarcadero: Simplify addition of -P flag for C++

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5522
2020-12-04 08:27:55 -05:00
Brad King
0eead931a3 Merge topic 'versionadded'
5000f93a91 Help: Fix grammar in `.. versionadded` directives
8fea95319b Help: Add `.. versionadded` directives to module docs
8634561dca Help: Improve formatting for FindBoost and FindCUDA
ea59b0cd34 Help: Fix version note for CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE
05c3060b10 Help: Fix cmake_parse_arguments version note
dafcef8b50 Help: Improve styling for versionadded/deprecated directives
6ae216daef Tests: Make RunCMake.CMP0106 expected output robust to line number changes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5560
2020-12-03 08:49:25 -05:00
Brad King
48aac247e9 Compile with explicit language flag when source LANGUAGE property is set
This change was originally made by commit 74b1c9fc8e (Explicitly specify
language flag when source LANGUAGE property is set, 2020-06-01,
v3.19.0-rc1~722^2), but it was reverted by commit 30aa715fac (Revert
"specify language flag when source LANGUAGE property is set",
2020-11-19) to restore compatibility with pre-3.19 behavior.

Implement the change again, but add policy CMP0119 to make this change
while preserving compatibility with existing projects.

Note that the `Compiler/{Clang,Intel,MSVC}-CXX` modules do not need to
specify `-TP` for their MSVC-like variants because we already use the
flag in `CMAKE_CXX_COMPILE_OBJECT`.  Similarly for `Compiler/XL-CXX`
and `Platform/Windows-Embarcadero`.

Note also that this does not seem possible to implement for XL C.
Even with `-qsourcetype=c`, `xlc` complains about an unknown suffix:
`1501-218 (W) file /.../AltExtC.zzz contains an incorrect file suffix`.
It returns non-zero even with `-qsuppress=1501-218`.

Co-Author: Robert Maynard <robert.maynard@kitware.com>
Fixes: #14516, #20716
2020-12-02 11:39:11 -05:00
Nikita Nemkin
5000f93a91 Help: Fix grammar in .. versionadded directives
Issue: #19715
2020-12-02 21:00:31 +05:00
Nikita Nemkin
8fea95319b Help: Add .. versionadded directives to module docs
Issue: #19715
2020-12-02 21:00:30 +05:00
Nikita Nemkin
ea59b0cd34 Help: Fix version note for CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE
This variable predates 3.0.

Fixes: #21522
2020-12-02 21:00:29 +05:00
Nikita Nemkin
05c3060b10 Help: Fix cmake_parse_arguments version note
Don't imply that cmake_parse_arguments() requires CMake 3.5+.
2020-12-02 21:00:28 +05:00
Brad King
a0f2e8cbfa Merge topic 'cpackifw-package-wizard-show-page-list'
8b5a0e0fef CPackIFW: Add CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5545
2020-12-02 09:30:07 -05:00
Brad King
628d7ef672 Merge topic 'cuda_env_archs'
c57541d874 CUDA: Fix tests with CUDAARCHS set
c4ae9384ff CUDA: Initialize CMAKE_CUDA_ARCHITECTURES using $ENV{CUDAARCHS}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5533
2020-12-01 09:37:07 -05:00
Brad King
ee4310c3d9 Merge topic 'compile_def_doc'
4b9fcadc9a Help: Describe definition values in target_compile_definitions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5547
2020-12-01 09:30:50 -05:00
Brad King
a24a4e18af Merge topic 'makefiles-compiler-deps-optims'
2c71d051fa Makefiles Generators: use compiler for dependencies generation
afd0f6785d Refactoring: Abstract Makefile line continuation format
b6068ce407 Refactoring: enhance include file filtering
3401403f69 Refactoring: Introduce place-holder for dependency target.
a97c41bf8b Refactoring: Makefiles Generators: Add support for various depends scanners

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !5528
2020-11-30 13:26:53 -05:00
Juan Ramos
4b9fcadc9a Help: Describe definition values in target_compile_definitions
Fixes: #20573
2020-11-30 13:22:37 -05:00
Brad King
0173cdcc01 Merge topic 'make-GENERATED-visible-from-any-scope'
573d51201a GENERATED prop: Set CMP0118 to NEW for some (unrelated) tests
6624b65b3f GENERATED prop: Add implementation for policy CMP0118 being set to NEW
b14fe704f8 GENERATED prop: Simplify determining the language of a source file
ca4ce458a3 GENERATED prop: Check CMP0118 policy and warn in certain situations
0eb30f175e GENERATED prop: Introducing policy CMP0118 and its documentation
78c8d95605 GENERATED prop: Add some tests before introducing changes with CMP0118
e01527619f Simplify code by calling a function directly instead of duplicating it
75cb8615e9 Fix typo in function name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5308
2020-11-30 12:38:17 -05:00
Raul Tambre
c4ae9384ff CUDA: Initialize CMAKE_CUDA_ARCHITECTURES using $ENV{CUDAARCHS}
NVCC's default architecture may be newer than the one supported by the
machine's GPU.
In such cases it's useful to have an environment variable for initializing
CMAKE_CUDA_ARCHITECTURES to avoid specifying it for every invocation.
2020-11-30 17:57:11 +02:00
Craig Scott
8187bd2f4b Merge topic 'xcode-embed-frameworks'
7c7b879e1f Help: Add missing release note for XCODE_EMBED_*

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5550
2020-11-30 07:01:56 -05:00
Craig Scott
7c7b879e1f Help: Add missing release note for XCODE_EMBED_*
In 5651901c54 (Xcode: add support for embedding frameworks, 2020-10-24)
we neglected to add a release note for the new target properties
that were added.
2020-11-30 10:17:15 +11:00
Craig Scott
ea212834c0 Merge topic 'xcode-embed-frameworks'
5651901c54 Xcode: add support for embedding frameworks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Cameron Lowell Palmer <cameron.palmer@icloud.com>
Merge-request: !5418
2020-11-29 16:54:15 -05:00
Craig Scott
5a868f1488 Merge topic 'presets-docs-bug'
ca289abea5 Help: Fix presets typo (longDescription to displayName)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5541
2020-11-29 16:02:00 -05:00
Marc Chevrier
2c71d051fa Makefiles Generators: use compiler for dependencies generation
Each source compilation generates a dependencies file. These dependencies
files are consolidated in one file per target. This consolidation is done
as part of command 'cmake -E cmake_depends` launched before evaluation of
makefile dependency graph.

The consolidation uses the same approach as `CMake` dependencies management.

Fixes: #21321
2020-11-29 15:25:42 +01:00
Sam Freed
ca289abea5 Help: Fix presets typo (longDescription to displayName) 2020-11-28 16:32:31 +11:00
Gusts Kaksis
5651901c54 Xcode: add support for embedding frameworks
This commit also prepares for embedding things other than
frameworks. In the future, we may want to embed resources and
other types supported by Xcode, so the target properties have
been documented in a way that clearly signals the future intent.
2020-11-28 15:36:24 +11:00
Konstantin Podsvirov
8b5a0e0fef CPackIFW: Add CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST variable
Add CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST variable to
control visibility of the widget listing installer pages on the left side
of the wizard. This feature available only since QtIFW 4.0.
2020-11-27 22:32:45 +03:00
Brad King
d231d92289 Help/dev: Add a CMake Experimental Features Guide
Initialize it with placeholder content.  This document will serve to
contain documentation for experimental features that are under
development and not yet included in official documentation.
2020-11-24 16:29:34 -05:00
Deniz Bahadir
0eb30f175e GENERATED prop: Introducing policy CMP0118 and its documentation
Note: This is currently only defining the CMP0118 policy and providing
its documentation, however, the implementation is still not using it.
2020-11-24 17:41:02 +01:00
Brad King
ee53b1af19 Merge topic 'doc-removed-UseJava-modules'
51ee82ddc6 Help: Restore documentation placeholder for removed modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5523
2020-11-23 11:25:31 -05:00
Brad King
d1b6879ece Merge topic 'ctest_custom_versions' into release-3.19
6e7625989c Help: Fix `.. versionadded` directives for CTEST_CUSTOM_* variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5524
2020-11-23 11:24:22 -05:00
Brad King
4e4ced79fd Merge topic 'ctest_custom_versions'
6e7625989c Help: Fix `.. versionadded` directives for CTEST_CUSTOM_* variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5524
2020-11-23 11:24:22 -05:00
Brad King
8832b695e0 Merge topic 'cuda_11'
046e454fdd CUDA: Error if can't determine toolkit library root
440dc98b07 CUDA: Clang CUDA 11.1 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5525
2020-11-23 11:23:02 -05:00
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
Nikita Nemkin
6e7625989c Help: Fix .. versionadded directives for CTEST_CUSTOM_* variables
CTEST_CUSTOM_* variables predate 3.0, but the docs were only added in 3.4.

Issue: #19715
2020-11-22 03:15:45 +05:00
Brad King
51ee82ddc6 Help: Restore documentation placeholder for removed modules
In commit cb28d9af1f (UseJava: Move helper scripts to subdirectory,
2020-11-12) we removed modules that were not meant to be documented
publicly.  In order to keep links from older versions on `cmake.org` to
the "latest" documentation working for those modules, add placeholder
documents describing the change.
2020-11-20 12:30:14 -05:00
Brad King
60a131efd5 Merge topic 'revert-explicit-LANGUAGE-flag'
30aa715fac Revert "specify language flag when source LANGUAGE property is set"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5519
2020-11-20 10:05:11 -05: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
Brad King
c8b2331e8b Merge topic 'rename_cuda_memcheck'
fea49b2df0 CTest: Rename CudaMemcheck to CudaSanitizer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5514
2020-11-18 07:29:54 -05:00
Tobias Ribizel
fea49b2df0 CTest: Rename CudaMemcheck to CudaSanitizer 2020-11-17 21:06:30 +01:00
Brad King
01b473b810 Merge topic 'msvc-no-GR'
c00a6d3967 MSVC: Do not add /GR to CMAKE_CXX_FLAGS by default
6114c8e994 MSVC: Factor out initialization of /GR flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5508
2020-11-16 11:19:28 -05:00
Craig Scott
eb04e25ba6 Merge topic 'cmake_path-enhancements'
ed21ad181e cmake_path: various enhancements to subcommands/keywords

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5457
2020-11-14 06:39:42 -05:00
Brad King
c00a6d3967 MSVC: Do not add /GR to CMAKE_CXX_FLAGS by default
The `/GR` flag has been on by default since MSVC cl 14.0 from VS 2005.
Remove it from the default flags to make it easier for projects to pass
`/GR-` themselves to turn it off.

Projects may be using string processing to replace `/GR` with another
flag, so we cannot simply drop it.  Add a policy to drop it in a
compatible way.

Fixes: #21428
2020-11-13 11:46:23 -05:00
Brad King
225fb10f67 Merge topic 'usejava_helpers'
cb28d9af1f UseJava: Move helper scripts to subdirectory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5501
2020-11-13 09:48:56 -05:00
Brad King
d06676ebee Merge topic 'versionadded'
c43e845d09 Help: Add `.. versionadded` directives to generator docs
f6fd769ae9 Help: Add `.. versionadded` directives to CPack generator docs
a19058d7d8 Help: Replace some `versionadded` directives with `versionchanged`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5495
2020-11-13 09:47:37 -05:00
Brad King
c457670711 Merge topic 'qtifw-archivegen'
5ab75dd7dd CPack/IFW: Locate the archivegen utility

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5503
2020-11-13 09:45:33 -05:00
Brad King
c35c4ae85c Merge topic 'qtifw-archivegen' into release-3.19
5ab75dd7dd CPack/IFW: Locate the archivegen utility

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5503
2020-11-13 09:45:32 -05:00
Brad King
eb73f343f0 Merge topic 'doc-cstd'
48645cabe3 Help: MSVC now has C standard level flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5500
2020-11-13 09:43:08 -05:00
Brad King
ddd6979aab Merge topic 'doc-cstd' into release-3.19
48645cabe3 Help: MSVC now has C standard level flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5500
2020-11-13 09:43:07 -05:00
Erlend Egeberg Aasland
5ab75dd7dd CPack/IFW: Locate the archivegen utility
Fixes: #21427
2020-11-12 21:22:53 +01:00
Nikita Nemkin
cb28d9af1f UseJava: Move helper scripts to subdirectory
Also, exclude them from the help module index.
2020-11-12 20:14:05 +05:00
Michael Hirsch
48645cabe3 Help: MSVC now has C standard level flags 2020-11-12 09:41:24 -05:00
Nikita Nemkin
c43e845d09 Help: Add .. versionadded directives to generator docs
More `.. versionadded` could be added later when the features,
variables and properties relevant to each generator are properly
documented.

Issue: #19715
2020-11-12 09:45:10 +05:00