Commit Graph

703 Commits

Author SHA1 Message Date
Tin Huynh
83ea49818f NVHPC: Add support for NVIDIA HPC SDK compilers based on PGI
Identify the compilers as `NVHPC` to distinguish it from the older PGI
compilers from which they evolved, and from other `NVIDIA` compilers.

Fixes: #20887
2021-01-27 09:53:02 -05:00
Brad King
5a6379f1fd Help: Clarify meaning of CMAKE_SYSTEM_PROCESSOR
On Windows the value may not match the compiler's target architecture.
Update the documentation to state this explicitly.

Issue: #15170
2021-01-26 11:04:22 -05:00
Brad King
3c80666f00 Help: Document intended purpose of XCODE_ATTRIBUTE_<an-attribute>
Also warn the reader against setting values CMake normally generates.

Issue: #21728
2021-01-23 07:29:10 +11:00
Brad King
fddbb7db4b Merge topic 'vs-sdk-selection'
1e67482daf VS: Generalize Win10 max SDK version to all VS generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5721
2021-01-21 09:18:31 -05:00
jonathan molinatto
1e67482daf VS: Generalize Win10 max SDK version to all VS generators
The `CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM` variable added in
CMake 3.19 by commit ba497111f6 (VS: Add option for custom Win10 SDK
version maximum, 2020-08-20, v3.19.0-rc1~262^2) was documented as if it
worked for all generators but implemented only to override CMake's
builtin default for the VS 2015 max SDK version.  Generalize the
variable to set a custom max SDK version for later VS versions too.

Fixes: #21720
2021-01-20 14:46:34 -05:00
Pawel Dac
4426ddda1c Help: Clarify memory check sanitizer option behavior for log_path
Added information about prepending [ASAN/LSAN/TSAN/MSAN/UBSAN]_OPTIONS
to MemoryTesterEnvironmentVariable and `log_path` limitation.
2021-01-13 23:14:26 +01:00
Raul Tambre
baa530fe9f Help: Add example for setting default CMAKE_CUDA_ARCHITECTURES value
Fixes #21302 and #21666.
2021-01-10 12:06:02 +02:00
Brad King
4f5a12be29 Merge topic 'reword_MSVC_documentation'
1185438ea8 Help: Reword the MSVC variable documentation focusing on cl.exe compatibility

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5676
2021-01-08 09:12:47 -05:00
Thomas Bernard
1185438ea8 Help: Reword the MSVC variable documentation focusing on cl.exe compatibility
Fixes: #21651
2021-01-07 16:32:48 -05:00
Shannon Booth
a742b5d137 CMAKE_EXPORT_COMPILE_COMMANDS: allow configuration per target
The new target property `EXPORT_COMPILE_COMMANDS` associated with the
existing global variable can be used to optionally configure targets for
their compile commands to be exported.

Fixes: #19462
2021-01-06 11:51:39 +13:00
Craig Scott
d2456b29f4 Merge topic 'unity-anon-ns'
0fe9c40494 Unity Build: Add option for generating per-file unique id

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4784
2020-12-16 07:40:41 -05:00
Brad King
67f12dd1d6 Merge topic 'ispc_control_header_suffixes'
c9a50f3556 ISPC: Generated Headers suffix configurable with a better default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5597
2020-12-15 07:40:34 -05:00
Stephen Kelly
0fe9c40494 Unity Build: Add option for generating per-file unique id
Fixes: #21477
2020-12-15 22:26:09 +11:00
Robert Maynard
c9a50f3556 ISPC: Generated Headers suffix configurable with a better default
The target property `ISPC_HEADER_SUFFIX` and associated global
variable now can control the suffix used when generating the
C/C++ interoperability ISPC headers.

In addition the default suffix is now "_ispc.h" which matches the
common convention that the ISPC compiler team uses and recommends.
2020-12-14 13:13:09 -05:00
Guillem Vela
1f41eb8472 Help: Fix small typos in documentation 2020-12-14 07:18:47 -05:00
Brad King
794aa36b1f Merge topic 'apple-silicon-host-arch'
b7f0327dcd Tests: Cover macOS host architecture selection on Apple Silicon hosts
5f882f6ce5 macOS: Offer control over host architecture on Apple Silicon hosts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5589
2020-12-11 13:05:34 -05:00
Brad King
5f882f6ce5 macOS: Offer control over host architecture on Apple Silicon hosts
Since commit b6c60f14b6 (macOS: Default to arm64 architecture on Apple
Silicon hosts, 2020-09-28, v3.19.0-rc1~63^2) we use `sysctl` to detect
that we are running on Apple Silicon in a way that pierces Rosetta.
This always sets `CMAKE_HOST_SYSTEM_PROCESSOR` to be `arm64` on such
hosts.  However, macOS offers strong support for running processes under
an emulated `x86_64` architecture.

Teach CMake to select either `arm64` or `x86_64` as the host
architecture on Apple Silicon based on the architecture of its own
process.  When CMake is built as a universal binary, macOS will select
whichever slice (architecture) is appropriate under the user's shell,
and `CMAKE_HOST_SYSTEM_PROCESSOR` will match.

Also offer a `CMAKE_APPLE_SILICON_PROCESSOR` variable and environment
variable to provide users with explicit control over the host
architecture selection regardless of CMake's own architecture.

Finally, if `CMAKE_OSX_ARCHITECTURES` is not set, pass explicit flags to
the toolchain to use selected host architecture instead of letting the
toolchain pick.

Fixes: #21554
2020-12-10 12:08:13 -05:00
Brad King
f200ac1304 Merge topic 'remove-partial-intel-compiler-support'
41b69348a5 Revert "Intel: Add Intel DPC++ compiler identification"
f0babb53b3 Revert "Intel: Add Intel Clang compiler identification"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Axel Huebl <axel.huebl@plasma.ninja>
Merge-request: !5583
2020-12-08 10:16:21 -05:00
Brad King
41b69348a5 Revert "Intel: Add Intel DPC++ compiler identification"
Revert commit 887f3a88a6 (Intel: Add Intel DPC++ compiler
identification, 2020-09-21, v3.19.0-rc1~124^2).  The compiler has
already been released, and is more usable with CMake by pretending to be
upstream Clang than by identifying it as a compiler for which we have
not implemented support.

Fixes: #21551
2020-12-07 10:46:27 -05:00
Brad King
f0babb53b3 Revert "Intel: Add Intel Clang compiler identification"
Revert commit 5c3a93ab88 (Intel: Add Intel Clang compiler
identification, 2020-09-29, v3.19.0-rc1~68^2).  The compiler has already
been released, and is more usable with CMake by pretending to be
upstream Clang than by identifying it as a compiler for which we have
not implemented support.

Issue: #21551
2020-12-07 10:46:22 -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
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
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
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
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
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
9450ab0d23 Merge topic 'envvar_versions'
5934a6275c Help: Fix `.. versionadded` directives in environment variable docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5498
2020-11-11 15:22:26 -05:00
Nikita Nemkin
5934a6275c Help: Fix .. versionadded directives in environment variable docs
Many environment variables were documented late and got
assigned wrong versions by the script.
(The whole Help/envvar section was only added in 3.10).

Issue: #19715
2020-11-11 20:38:18 +05:00
Brad King
ffda92d4bf Merge topic 'clang-tidy-for-objc'
1134064e22 clang-tidy: allow OBJC and OBJCXX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5467
2020-11-06 08:05:00 -05:00
Craig Scott
9201b3fa40 Merge topic 'help_ctest_cuda_memcheck'
e620bb7293 Help: Add cuda-memcheck to CTest documentation
fb98883e2b CTest: Add cuda-memcheck to Dart and CTest module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5469
2020-11-06 05:50:53 -05:00
Andrew Fuller
1134064e22 clang-tidy: allow OBJC and OBJCXX 2020-11-05 11:39:32 -08:00
Tobias Ribizel
e620bb7293 Help: Add cuda-memcheck to CTest documentation
Issue: #21388
2020-11-05 10:05:01 -05:00
Brad King
a9e2b18bf3 Merge topic 'android-stl'
4dca078829 Android: Link c++abi and android_support when necessary
738caa4d48 Android: Add options to control exceptions/rtti

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5444
2020-11-05 07:55:46 -05:00
Haibo Huang
738caa4d48 Android: Add options to control exceptions/rtti
With the NDK's `android.toolchain.cmake`, the user can control whether
exceptions/rtti is enabled using `ANDROID_CPP_FEATURES`:

  43b2de34ef/build/cmake/android.toolchain.cmake (548)

Add `CMAKE_ANDROID_RTTI` and `CMAKE_ANDROID_EXCEPTIONS` to support that.
2020-11-04 14:18:03 -05:00
Brad King
f511a1c009 CMakeDetermineCompilerABI: Detect byte order as part of check
We already detect `sizeof(void*)`.  Detect the byte order as part of the
same check.

Issue: #21392
2020-11-04 10:08:13 -05:00
Christopher Tetreault
fb95d02252 Help: Document case insensitivity for CMAKE_BUILD_TYPE
The value of CMAKE_BUILD_TYPE is case insensitive. Furthermore, the
actual value of the variable will have the same casing as the user
specifies on the command line.
2020-10-23 09:19:29 -04:00
Kyle Edwards
146e1e6ba1 Ninja: Transform DEPFILEs with policy CMP0116
Fixes: #21267
2020-10-13 10:19:46 -04:00
Brad King
e1ab55b4ca Help: Update Sphinx versionadded directives for 3.19 release
Run the script:

    Utilities/Sphinx/update_versions.py --since v3.18.0 --overwrite
2020-10-08 09:30:26 -04: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
Brad King
9fc742041b Merge topic 'intel-clang'
5c3a93ab88 Intel: Add Intel Clang compiler identification

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5300
2020-10-01 07:55:13 -04:00
Andrey Starodubtsev
c1f1eaf7a4 VS: Teach CMAKE_MFC_FLAG to support generator expressions 2020-09-30 12:24:13 -04:00
Brad King
e8b0359a43 cmake_language: Add signature to DEFER calls to later times
Fixes: #19575
2020-09-29 17:12:33 -04:00
Harini Chilamantula
5c3a93ab88 Intel: Add Intel Clang compiler identification
The compiler identifies itself with the `__INTEL_CLANG_COMPILER`
preprocessor definition.
2020-09-29 17:00:43 -04:00
Harini Chilamantula
887f3a88a6 Intel: Add Intel DPC++ compiler identification
The compiler identifies itself with the `__INTEL_DPCPP_COMPILER__`
preprocessor definition.
2020-09-22 15:20:03 -04: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
Brad King
2db623f554 Xcode: Add option to specify build system variant
Extend the `-T <toolset>` option to support a `buildsystem=` field with
the Xcode generator.  Add a `CMAKE_XCODE_BUILD_SYSTEM` variable to
inform project code about the selected build system variant.
2020-09-18 12:49:17 -04:00
Brad King
48ed3bae58 Merge topic 'pch-instantiate-templates'
8c8f03422e PCH: Template instantiation support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Tested-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5168
2020-09-10 16:32:39 -04:00
Robert Maynard
a020787a9b ISPC: Support generation for multiple instruction sets 2020-09-04 08:37:07 -04:00
Robert Maynard
5a1750017e ISPC: Add compiler launcher support 2020-09-03 11:46:11 -04:00