summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'qcc-8-cxx-lang-flag' into release-4.0Brad King2025-08-051-3/+11
|\ | | | | | | | | | | | | 166061629a QCC-CXX: use `-x c++` on 8+ Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !10992
| * QCC-CXX: use `-x c++` on 8+Ben Boeckel2025-08-021-3/+11
| | | | | | | | The `-lang-c++` flag has been deprecated.
| * Merge topic 'clang-libstdcpp-3.31' into release-3.31Brad King2025-05-142-19/+166
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 802f261d62 experimental/CXXModules: recycle the UUID c88f3ea1e4 Clang/CXXImportStd: support `-stdlib=libstdc++` ba5c9703b1 Experimental: recycle the `import std` UUID 9cad48c6cb gcc: support `import std` acbada3df6 Tests/RunCMake: handle C++26 support where needed Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !10778
* | \ Merge branch 'clang-libstdcpp-3.31' into clang-libstdcpp-3.31-4.0Ben Boeckel2025-05-141-19/+32
|\ \ \ | | |/ | |/| | | | | | | | | | * clang-libstdcpp-3.31-bp: experimental/CXXModules: recycle the UUID Clang/CXXImportStd: support `-stdlib=libstdc++`
| * | Clang/CXXImportStd: support `-stdlib=libstdc++`Ben Boeckel2025-05-141-19/+32
| | | | | | | | | | | | | | | Fedora 42 ships `clang` with `libstdc++` as the default. Detect and support `import std;` in this configuration.
| * | gcc: support `import std`Ben Boeckel2025-05-141-0/+134
| | | | | | | | | | | | | | | (cherry picked from commit a980dab9b1 (gcc: support `import std`, 2024-11-21))
* | | Merge topic 'automoc-predefs' into release-4.0Brad King2025-04-245-5/+5
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | ccef69bde4 AUTOMOC: Avoid compiler warnings while computing predefines Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !10702
| * | AUTOMOC: Avoid compiler warnings while computing predefinesBrad King2025-04-245-5/+5
| |/ | | | | | | | | | | | | | | | | 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.
* | Clang: MSVC C++26 supportRaul Tambre2025-04-211-1/+3
| | | | | | | | C++26 is implied by `/std:c++latest` since LLVM 17, commit `b763d6a4ed`.
* | Merge topic 'msvc-c++23' into release-4.0Brad King2025-03-171-5/+1
|\ \ | |/ | | | | | | | | | | d54916d03a MSVC: Revert use of temporary -std:c++23preview flag for C++23 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !10470
| * MSVC: Revert use of temporary -std:c++23preview flag for C++23Brad King2025-03-141-5/+1
| | | | | | | | | | | | | | | | | | | | 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
* | Merge topic 'msvc-c++23' into release-4.0Brad King2025-03-131-3/+11
|\ \ | |/ | | | | | | | | | | | | 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
| * MSVC: Use -std:c++23preview flag for C++23 when availableBrad King2025-03-121-1/+5
| | | | | | | | | | | | This was added by VS 17.13. Fixes: #26692
| * MSVC: Split C++23 flag selection into dedicated blockBrad King2025-03-121-3/+7
| |
* | LICENSE: Replace references to Copyright.txt with LICENSE.rstKitware Robot2025-03-0337-37/+37
| | | | | | | | | | | | | | | | | | | | ``` git grep -lz 'Copyright.txt or https://cmake.org/licensing ' | while IFS= read -r -d $'\0' f ; do sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / { s/Copyright.txt/LICENSE.rst/ }' "$f" ; done ```
* | Tasking: Enable WHOLE_ARCHIVE link featureJosef Angstenberger2025-02-061-0/+8
| | | | | | | | Issue: #26426
* | Tasking: Set response file flagJosef Angstenberger2025-02-061-0/+1
| | | | | | | | | | | | | | If not explicitly set to `-f `, the default `@` is used, which is not supported by Tasking. Issue: #26426
* | Tasking: Set object extension to .oJosef Angstenberger2025-02-061-0/+1
| | | | | | | | | | | | | | The extension `.o` is used by the compiler itself, and is the only one found in its documentation. Issue: #26426
* | Extend CMAKE_<LANG>_LINK_MODE supportMarc Chevrier2025-01-261-1/+0
| | | | | | | | | | * Add CMAKE_Swift_LINK_MODE * Ensure correct definition for various clang usages on Windows
* | Merge topic 'remove-old-compatibility'Brad King2025-01-233-15/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | CMP0057: Remove support for OLD behaviorBrad King2025-01-223-15/+0
| | |
* | | Merge topic 'tasking-std-flags'Brad King2025-01-222-10/+10
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | c0972d2c81 Tasking: Drop extensions from C and CXX standard level flags Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Josef Angstenberger <code@jtxa.de> Merge-request: !10208
| * | | Tasking: Drop extensions from C and CXX standard level flagsAlaa Mahran2025-01-212-10/+10
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Introduce CMAKE_<LANG>_DEVICE_LINK_MODE variable.Marc Chevrier2025-01-212-0/+4
|/ / | | | | | | This is a complement to commit 00932ea864 (Introduce CMAKE_<LANG>_LINK_MODE variable., 2025-01-09)
* | Merge topic 'tasking-asm'Brad King2025-01-201-3/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | 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
| * | Tasking: Add support for ASM through the cctc compiler driverAlaa Mahran2025-01-171-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | CMP0025: Remove support for OLD behaviorBrad King2025-01-192-10/+0
|/ /
* | Merge topic 'clang-cuda-link-flags'Brad King2025-01-151-1/+1
|\ \ | |/ | | | | | | | | | | | | ae7f54e6a7 Clang/CUDA: Fix language-wide flags when linking .so with compiler driver Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: DavidRV00 <david@davidv.xyz> Merge-request: !10173
| * Clang/CUDA: Fix language-wide flags when linking .so with compiler driverBrad King2025-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* | Merge topic 'fix-typos-found-by-pre-commit-hooks'Brad King2025-01-141-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Fix: A lot of typos in code found by `typos`Alex Turbov2025-01-121-1/+1
| | | | | | | | | | | | | | | | | | Yet another great code spellchecker: https://github.com/crate-ci/typos/ (Will be added later as a `pre-commit` hook)
* | | Merge topic 'CMAKE_LANG_LINK_MODE-variable-creation'Brad King2025-01-1332-1/+74
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 00932ea864 Introduce CMAKE_<LANG>_LINK_MODE variable. Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Alex <leha-bot@yandex.ru> Merge-request: !10162
| * | | Introduce CMAKE_<LANG>_LINK_MODE variable.Marc Chevrier2025-01-1032-1/+74
| |/ / | | | | | | | | | | | | | | | 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.
* | | Merge topic 'lfortran-generate-object-code'Brad King2025-01-101-1/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | daf6cc89ee LFortran: Remove hard-coded --generate-object-code flag Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !10159
| * | LFortran: Remove hard-coded --generate-object-code flagSaurabh Kumar2025-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge topic 'tasking-flags'Brad King2025-01-102-7/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Tasking: Fix C Compiler standard and extension flagsAlaa Mahran2025-01-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove incorrect `--strict` flag for the C compiler. - Add C compiler extensions. Fixes: #26591
| * | | Tasking: Fix flag for COMPILE_WARNING_AS_ERRORAlaa Mahran2025-01-091-1/+1
| | |/ | |/| | | | | | | Issue: #26591
* | | gcc: support `import std`Ben Boeckel2025-01-081-0/+134
|/ /
* | NVHPC: Add support for CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAINBrad King2024-12-161-0/+1
| | | | | | | | NVHPC has a `--gcc-toolchain=` flag just like LLVM/Clang and IntelLLVM.
* | Merge topic 'vs-clang-cl-c++23'Brad King2024-12-101-0/+5
|\ \ | |/ | | | | | | | | | | | | | | 30139913e9 VS: Restore support for mixing C++23 and C in one target with clang-cl 57da8712c1 VS: Factor out check for mixed C and C++ target Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !10082
| * VS: Restore support for mixing C++23 and C in one target with clang-clBrad King2024-12-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | IBMClang: Express compiler information as a Clang variantDavid Tenty2024-12-047-90/+24
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge topic 'intel-classic-no-linker-depfile'Brad King2024-11-291-0/+3
|\ \ | |/ | | | | | | | | | | aeaec06267 Intel/Classic: deactivate linker dependency file support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !10048
| * Intel/Classic: deactivate linker dependency file supportMarc Chevrier2024-11-281-0/+3
| | | | | | | | | | | | | | The Intel Classic compilers' IPO plugins do not support the `-Wl,--dependency-file,...` linker flag. Fixes: #26483
* | ARMClang: Remove orphaned linker --list optionDaniel Brondani2024-11-181-1/+1
|/ | | | | | | | | | | | | 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
* LFortran: Improve detection of implicit link information for lfortran 0.40+Brad King2024-10-241-1/+1
| | | | | | | These versions of LFortran support passing `-v -Wl,-v` to the underlying compiler so we can extract the full implicit link information. Issue: #26145
* Clang/CUDA: Add language-wide flags when linking with compiler driverBrad King2024-10-071-2/+2
| | | | | | We do this for other compiler/language combinations, but these flags were left out by commit 5df21adf46 (CUDA: Add support for Clang compiler, 2020-03-07, v3.18.0-rc1~145^2~1).
* NVHPC: Record C++23 supportscivision2024-10-021-0/+7
| | | | | | NVHPC 24.9 documents support for `-std=c++23` [1]. [1] https://docs.nvidia.com/hpc-sdk/archive/24.9/hpc-sdk-release-notes/index.html
* clang-cl: Add support for C++23Brad King2024-09-131-3/+11
| | | | | | | | Although there is no `cl -std:c++23` flag, the underlying Clang compiler does have a C++23 mode we can activate by passing `-std=c++23` through a `clang-cl` wrapper flag. Fixes: #26061