Commit Graph

927 Commits

Author SHA1 Message Date
Brad King
e4819c3a7a Merge topic 'armclang-update-version-computation'
65fac2fa35 ARMClang: Fix computation of compiler semantic version patch level

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8636
2023-07-18 13:48:50 -04:00
Daniel Brondani
65fac2fa35 ARMClang: Fix computation of compiler semantic version patch level
According to ARMClang documentation 6.20, the patch version number
should not include the last two digits of `__ARMCOMPILER_VERSION`,
which are reserved for internal use by ARM.
2023-07-18 13:29:01 -04:00
Brad King
d599c9e92e Merge topic 'support_nvhpc_versions_without_isystem'
f73ae7c510 NVHPC: Support nvfortran versions that don't support isystem

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8588
2023-06-26 09:44:57 -04:00
Robert Maynard
f73ae7c510 NVHPC: Support nvfortran versions that don't support isystem
Fixes: #25019
2023-06-23 12:14:09 -04:00
Marc Chevrier
5945a98ced link dependencies: deactivate the feature
Unfortunately it breaks in combination with LTO due to a bug in the GNU
linker.

Fixes: #25014
2023-06-23 10:35:04 -04:00
Marc Chevrier
0626b62cf2 Link Step: ensure the correct linker is used for depfile configuration
This is related to MR !8443.
2023-05-28 11:28:08 +02:00
Brad King
b6c45d28b2 Merge topic 'clang_cxx26'
0183956d30 Clang: C++26 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8480
2023-05-18 09:22:02 -04:00
Felipe Torrezan
7cd982faf4 IAR: Added support for IAR C/C++ Compiler for Microchip AVR 8.10+
- Added C17 support
- Added C++17 support
- Changed: IAR UBROF Linker (XLINK) suffixed with target architecture (xlinkavr)
2023-05-16 20:08:01 +02:00
Brad King
20c7219f8f Merge topic 'iar-align-output-extension'
cfec4c1c5e IAR: Enforce output extension for xlink targets
7fec8f993b IAR: Replace extension for compiler and assembler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8477
2023-05-16 10:44:23 -04:00
Raul Tambre
0183956d30 Clang: C++26 support
Added in LLVM commit b763d6a4ed4650c74c6846d743156468563b0e31.
This time the final flag form is supported from the get-go to reduce churn.
2023-05-16 09:51:07 +03:00
Joakim Lönnberg
cfec4c1c5e IAR: Enforce output extension for xlink targets 2023-05-12 13:58:32 +02:00
Brad King
4490a0c266 Merge topic 'dankm/tcsuffix'
6a82852dc2 Allow toolchain suffix without leading dash

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8462
2023-05-10 09:36:42 -04:00
Dan McGregor
6a82852dc2 Allow toolchain suffix without leading dash
FreeBSD installs both LLVM and gcc with tools named after the
major version, in the form "clang<major>", such as "clang16".

Detect compilers named this way, and find the related toolchain
tools.
2023-05-08 18:09:27 -06:00
Raul Tambre
eacacc70fc Clang: use -std=c++23 for Clang 17.0+
Canonical flag changed in LLVM commit ba15d186e5cef2620d562c6c9d9a6d570382cd0a.
2023-05-08 20:26:39 +03:00
Joakim Lönnberg
7fec8f993b IAR: Replace extension for compiler and assembler 2023-05-08 15:35:53 +02:00
Marc Chevrier
375e6fdbbe Link step: use linker dependency linker file
Based on work done by @ben.boeckel (!8051)

Fixes: #22217
2023-05-03 17:08:07 +02:00
Brad King
9b463cc4b5 Merge topic 'iar-silent-flag'
01e944128d IAR: Move linker silencing flag to CMAKE_EXE_LINKER_FLAGS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8421
2023-04-28 10:08:22 -04:00
Brad King
0f6a1dd3ed Ninja: Revert "Exclude NVHPC -Werror flags during Fortran preprocessing"
Revert commit 6b58cdd4cf (Ninja: Exclude NVHPC -Werror flags during
Fortran preprocessing, 2023-04-04).  Since commit 9d40f01442 (NVHPC: Use
-Werror for COMPILE_OPTIONS_WARNING_AS_ERROR, 2023-04-13), `nvfortran`
can handle the plain `-Werror` flag during preprocessing.

Issue: #24665
2023-04-26 14:36:46 -04:00
Felipe Torrezan
01e944128d IAR: Move linker silencing flag to CMAKE_EXE_LINKER_FLAGS
The IAR linker silencer flag was previously hardcoded in
`CMAKE_${lang}_LINKER_EXECUTABLE`.  Move the flag to a place that is
under the end user's control.  The default behavior (silenced linker) is
not changed.

Fixes: #24828
2023-04-26 10:48:31 -04:00
Robert Maynard
9d40f01442 NVHPC: Use -Werror for COMPILE_OPTIONS_WARNING_AS_ERROR
The previously-used `-Werror all-warnings` is not supported by
the NVHPC suite of compilers.  This previously worked since `-Werror`
was being used and `all-warnings` was being excluded.

We thought this was the correct syntax due to incorrect documentation
about `-Werror`, which stated the argument should be space-separated,
while it should actually be separated with `=` or `,`.

Issue: #24665
2023-04-25 11:16:26 -04:00
Brad King
6b58cdd4cf Ninja: Exclude NVHPC -Werror flags during Fortran preprocessing
The Ninja generator preprocesses Fortran separately in order to scan for
module dependencies.  NVHPC's `nvfortran` does not support its `-Werror`
flag while preprocessing with `-E`, so filter it out.

Fixes: #24665
2023-04-04 14:53:26 -04:00
Nicole Rabjohn
79622d4a3e IBMClang: No thin LTO on AIX
AIX does not yet support thin LTO.
2023-03-23 11:46:17 -04:00
Brad King
ca8c171021 Merge topic 'clang-windows-cxx-modules'
1b7c26da49 Ninja: Wrap rules using '>' shell redirection with 'cmd /C' on Windows
ffd8537acf Clang: Record Clang 16.0 C++ modules flags only for GNU-like front-end
6013227230 cmGlobalNinjaGenerator: Use forward slashes in clang modmap format on Windows
d9d74b5e8a cmDyndepCollation: Drop outdated mentions of CXX_MODULE_INTERNAL_PARTITIONS
edab56d29a cmLocalNinjaGenerator: De-duplicate condition for using 'cmd /C' on Windows
8ebe3f92b3 cmGlobalNinjaGenerator: Detect GNU-like command-line for dyndep collator
f3ca199c9b cmGlobalNinjaGenerator: Factor out GNU-like command-line detection on Windows
f79817fcf0 cmCxxModuleMapper: Use value semantics in path conversion callback
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8346
2023-03-21 08:58:43 -04:00
Brad King
ffd8537acf Clang: Record Clang 16.0 C++ modules flags only for GNU-like front-end
The settings added by commit 3fe8e33f27 (Clang: Record Clang 16.0 flags
for our experimental C++ modules support, 2023-03-03, v3.26.0-rc6~6^2)
work only for the GNU-like `clang++` front-end, and not for the
MSVC-like `clang-cl` on Windows.

Also quote the path to `clang-scan-deps` to support spaces in its path.

Issue: #24611
2023-03-20 13:13:08 -04:00
Joakim Lönnberg
9df52c7f1c IAR: Version update for arm assembler 2023-03-16 11:48:31 +01:00
Brad King
d34c98b06a Merge topic 'iar-improve-asm'
21f19d6af7 IAR:Improved assembler support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8323
2023-03-15 09:53:16 -04:00
Brad King
db4f4ad24e Merge topic 'support_cubin_fatbin_optix_cuda_output'
2def6a874b CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8259
2023-03-14 09:35:00 -04:00
Joakim Lönnberg
21f19d6af7 IAR:Improved assembler support 2023-03-14 10:14:26 +01:00
Robert Maynard
2def6a874b CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilation 2023-03-13 09:54:00 -04:00
Brad King
617b8df7cf Merge topic 'clang-16-cxx-modules'
3fe8e33f27 Clang: Record Clang 16.0 flags for our experimental C++ modules support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !8285
2023-03-06 08:59:21 -05:00
Brad King
3fe8e33f27 Clang: Record Clang 16.0 flags for our experimental C++ modules support
LLVM/Clang 16.0 now contains official support for what CMake needs.
2023-03-03 12:44:53 -05:00
Joakim Lönnberg
3b365c461f IAR: Tolerate variables named for languages
If a project or user sets a variable or cache entry named `C` or `CXX`,
we were previously comparing those language names to the value of that
variable, rather than the name itself.  Double-quote the string to take
advantage of policy `CMP0054`, but also add "x" prefixes to support
projects that do not set the policy.

This extends a similar fix from commit c8eb357738 (CompilerId: Tolerate
variables named for languages, 2021-06-17, v3.21.0-rc1~9^2).
2023-02-21 09:24:14 -05:00
makise-homura
9f9d121ddb LCC: Disable Fortran preprocessor testing if unsupported
LCC < 1.24 has no way to disable integrated Fortran preprocessor,
and it can't produce preprocessed files explicitly. So we
disable all functionality (and therefore tests) related to it.
2023-02-16 03:55:31 +03:00
David Truby
3f1e58c5b9 LLVMFlang: Fix post-preprocess compile for fixed-form Fortran
LLVM Flang's preprocessor output is always valid fixed form Fortran with
a fixed line length of 72. If an application tries to use fixed form
with a different line length, this will fail in the
post-preprocessing compilation step as they will pass a flag asking for
a different fixed line length.

To fix this we can pass -ffixed-line-length-72 to the post-preprocess
compilation stage. This will be ignored when the input is free form
Fortran, and force to a 72 line length when the input is fixed.
2023-02-14 09:22:12 -05:00
Brad King
2a75edb342 LCC: Fix extraction of __LCC__ version components
Previously the logic only worked for major versions of the form `1.xx`.
Fix it to work with versions `2.xx` and above.
2023-02-13 09:29:32 -05:00
Brad King
5d40cf45fa Merge topic 'android-ndk-legacy-toolchain' into release-3.26
cb0b9452e8 Android: Provide CMAKE_ANDROID_NDK_VERSION with NDK legacy toolchain file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8170
2023-02-07 09:32:19 -05:00
Brad King
cb0b9452e8 Android: Provide CMAKE_ANDROID_NDK_VERSION with NDK legacy toolchain file
This variable has been provided since commit 746906242d (Android: Detect
NDK version number, 2021-02-26, v3.20.0-rc3~1^2~3) when using CMake's
NDK support or the modern NDK toolchain file.  Since commit 005e2cdfb0
(Android: Do not use gold for ndk >= r22, 2021-02-26, v3.20.0-rc3~1^2)
we need the value in our compiler/platform information files, so provide
it when using the NDK legacy toolchain file too.

Revert commit 1c86e397fe (Android/Clang: Tolerate undefined
CMAKE_ANDROID_NDK_VERSION, 2022-09-16, v3.25.0-rc1~118^2) since the
variable should now always be defined.

Issue: #21772
Fixes: #24386
2023-02-06 17:17:25 -05:00
Brad King
f6ed2585e5 Modules: Record system inspection steps in the configure log
Replace old-style `file(APPEND .../CMake{Output,Error}.log)` logging
with calls to `message(CONFIGURE_LOG)` to record the steps in the
`CMakeConfigureLog.yaml` configure log instead.

Issue: #23200
2023-01-18 17:59:10 -05:00
scivision
4331f7b4bf IntelLLVM: Add provisional flags for C23 and C++23 2023-01-16 15:08:34 -05:00
scivision
42ca6416af IntelLLVM: Replace -Qstd= with -Qstd: on Windows
The latter is the documented form [1].

[1] https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compiler-reference/compiler-options/language-options/std-qstd.html
2023-01-16 15:08:34 -05:00
Brad King
1efb3c5870 Merge topic 'IntelLLVM-msvc-no-cxx11'
88f9fdcb03 IntelLLVM: Avoid unnecessary -Qstd=c++11 flag on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8069
2023-01-13 08:43:30 -05:00
Brad King
88f9fdcb03 IntelLLVM: Avoid unnecessary -Qstd=c++11 flag on Windows
The IntelLLVM compiler, for compatibility with MSVC on Windows, always
runs with support for at least C++14.  The `-Qstd=c++11` flag just
causes a warning that it is unused.

Fixes: #24316
2023-01-12 15:58:14 -05:00
Brad King
29c4690e0a Merge topic 'cuda-nvcc-cuda20'
0aeeb8160c CUDA: Add support for cuda_std_20 for nvcc 12.0+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8008
2022-12-14 08:58:55 -05:00
Robert Maynard
0aeeb8160c CUDA: Add support for cuda_std_20 for nvcc 12.0+
CUDA 12.0 has been released with support for `-std=c++20`.
2022-12-13 10:18:15 -05:00
Ben Boeckel
51093f3002 Clang-FindBinUtils: also find clang-scan-deps
`clang-scan-deps` will be required for C++20 module scanning purposes.
2022-12-02 13:04:34 -05:00
Brad King
be9d93ecef Merge topic 'iar-rsp-on-objects'
a51e01f2ec IAR: Add response flag for files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7957
2022-11-29 10:33:50 -05:00
Brad King
a7a7a76e02 Merge topic 'msvc-cxx-no-optin-experimental-flag'
12e4bc73cb MSVC: don't opt into dyndep support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7965
2022-11-29 10:22:48 -05:00
Ben Boeckel
12e4bc73cb MSVC: don't opt into dyndep support
Instead, just set the variables for how scanning works since that is
part of the compiler mechanisms.

Fixes: #24198
2022-11-28 18:02:51 -05:00
Felipe Torrezan
a51e01f2ec IAR: Add response flag for files 2022-11-27 12:14:45 +01:00
Joerg Bornemann
d538cb0e18 Only initialize CMAKE_CXX_COMPILER_PREDEFINES_COMMAND
Don't initialize the other CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND
variables.

The only language variant that is used is
CMAKE_CXX_COMPILER_PREDEFINES_COMMAND, and the other language variants
contained invalid, namely C++-specific commands.

Fixes: #23968
2022-11-16 13:08:31 +01:00