LLVM/Clang 20, when invoked as `clang++ -E -c ...`, now warns:
warning: argument unused during compilation: '-c'
Drop the unnecessary `-c` flag. Also add a `-w` flag to suppress
warnings so their text is not parsed as predefines.
Pass `-g` to enable debugging, not `-O` for optimizations. This was
probably a typo in commit b50bfc8913 (HIP: Add language to CMake,
2020-08-28, v3.21.0-rc1~66^2~4).
Fixes: #26823
Revert commit b3f1c60aff (MSVC: Use -std:c++23preview flag for C++23
when available, 2025-03-12), except for the VS flag table update.
MSVC documentation states that the flag will be removed in the future
when `-std:c++23` is added. Therefore it is only suitable for manual
specification by end-users.
Issue: #26692
b3f1c60aff MSVC: Use -std:c++23preview flag for C++23 when available
1b4a802413 MSVC: Split C++23 flag selection into dedicated block
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10462
b3f1c60aff MSVC: Use -std:c++23preview flag for C++23 when available
1b4a802413 MSVC: Split C++23 flag selection into dedicated block
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10462
77f71ad4e2 Remove compatibility with CMake versions older than 3.5
fb1bd1d330 CMP0065: Remove support for OLD behavior
d9dd38cccf CMP0064: Remove support for OLD behavior
d88047c329 Remove compatibility with CMake versions older than 3.3
ac1a9cb160 CMP0063: Remove support for OLD behavior
36fffb673a CMP0062: Remove support for OLD behavior
789a7d73d4 CMP0061: Remove support for OLD behavior
3dc19e24cb CMP0060: Remove support for OLD behavior
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10210
Tasking compiler extensions and language standard flags are not tied
together as they are with gcc/clang. Since CMake does not model
granular abstractions for extensions, leave individual extension flags
to the project or user.
Fixes: #26591
fc163f9e43 Tasking: Add support for ASM through the cctc compiler driver
942f0d119b Tasking: Add identification for the tasking assembler
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10163
The Tasking ASM information module was added by commit 94df5b6ef1
(Tasking: Add support for several compiler toolsets, 2022-07-20,
v3.25.0-rc1~133^2). However, it appears to have been left from pattern
following and did not actually work with the Tasking assembler.
Update it to work when running the assembler through the compiler
driver `cctc`, which supports extensions `.asm` and `.src`.
Fixes: #26425
In commit cfa888a6e2 (Clang/CUDA: Add language-wide flags when linking
with compiler driver, 2024-10-07, v3.31.0-rc1~12^2) we added the wrong
placeholder to `CMAKE_CUDA_CREATE_SHARED_LIBRARY` to represent the
language-wide flags. The `<FLAGS>` placeholder is for executables.
The `<LANGUAGE_COMPILE_FLAGS>` placeholder is for shared libraries.
The distinction is for historical reasons.
Fixes: #26563
d620d77d26 FindDoxygen: Rename `_Doxygen_dne_header` -> `_Doxygen_do_not_edit_header`
e7ff3cccea PushToAndroidDevice.cmake: Rename `cmake_parse_arguments` prefix
bc8621d999 Fix: A lot of typos in code found by `typos`
b33beb7af5 Help: Fix some typos found by `sphinx-lint`
78e45c2db6 Style: Replace TABs with spaces for indentation in some files
74e0173f66 Tests(NuGet): Fix the test to ignore empty and space-only lines
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10151
a2f24a7ba7 Tasking: Fix C Compiler standard and extension flags
730f72aa20 Tasking: Fix flag for COMPILE_WARNING_AS_ERROR
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10152
This variable define how the link step is done. Possible values are:
* DRIVER: the compiler is used as driver for the link step
* LINKER: the linker is used directly for the link step.
This was added in commit 98d0f918ba (LFortran: Add support for this
compiler, 2024-01-25, v3.31.0-rc1~303^2~2) because it is needed for
cases covered by CMake's Fortran tests. However, it does not work
with Fortran modules and breaks lfortran's own `examples/project1`.
Move the flag to the test cases that need it, just as the original
commit did with `--implicit-interface`.
Fixes: #26597
Co-authored-by: Brad King <brad.king@kitware.com>
Since commit 474eafe28c (clang-cl: Add support for C++23, 2024-09-13,
v3.31.0-rc1~97^2) we use a Clang-specific flag to enable C++23 since
`clang-cl` has no `-std:c++23` flag, and `-std:c++latest` may enable an
even newer version of C++. However, in `.vcxproj` files there is no way
to express a target-wide `-clang:-std=c++23` flag for only C++ sources
when the target also has C sources. Add a special case to map back to
`-std:c++latest` for targets with C++23 and C together.
Fixes: #26508
De-duplicate IBMClang compiler information by detecting the base clang
version and following the same logic as we do for any other clang of
that version. This helps maintain support for new IBMClang features
inherited from new base Clang versions.
We already use this approach for other Clang variants, like CrayClang
and FujitsuClang.
Setting the `armlink --list` option without other diagnostic flags is
misleading because it produces an empty file and prevents the user from
printing diagnostics to the standard output or redirecting them to
another file.
It's unclear why the flag was added when support for ARMClang was first
added by commit 7b0abaac31 (ARMClang: Add support for Clang-based ARM
compiler, 2019-05-13, v3.15.0-rc1~111^2).
Fixes: #21538