summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'flang-j-as-moddir' into release-4.2Brad King2025-11-251-1/+1
|\ | | | | | | | | | | | | | | db6b82ae54 LLVMFlang-Fortran: Use -J instead of -module-dir Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: scivision <michael@scivision.dev> Merge-request: !11443
| * LLVMFlang-Fortran: Use -J instead of -module-dirTarun Prabhu2025-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | In flang, both -J and -module-dir support both joined and separate values. For the -J option, these are of the form `-J<value>` and `-J <value>` respectively. Once https://github.com/llvm/llvm-project/pull/168748 is committed, -module-dir will only work with a separate value. Setting CMAKE_Fortran_MODDIR_FLAG to -J ensures that both joined and separate styles will continue to work after that change is made. As far as behavior is concerned, both -J and -module-dir are aliases.
| * 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
| | * 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))
* | | QCC: Remove "-Wp," prefix for qcc system include argumentsDylan Ulis2025-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | `-Wp` is not needed on modern QNX/QCC. `-isystem` is supported directly since QNX 7.0 Fixes: #26912
* | | TIClang: Add flags for C17 standardDaniel Körner2025-10-071-3/+14
| | | | | | | | | | | | C17 is supported since version 1.3.
* | | cxximportstd: support setting the `import std` metadata locationBen Boeckel2025-09-113-47/+59
| | | | | | | | | | | | | | | | | | | | | | | | Some deployments may not be able to discover the metadata file reliably (e.g., custom `clang` builds on macOS while using the SDK's stdlib or distribution bugs). Allow users to force the location so that compiler-driven detection doesn't have to bend over backwards for unforeseen bugs.
* | | GHS C/CXX compiler: add NDEBUG compile define for non-debug aka release buildsAndreas Graf2025-09-082-6/+6
| | | | | | | | | | | | Fixes: #27203
* | | FASTBuild: Add generatorEduard Voronkin2025-08-261-2/+8
| | | | | | | | | | | | Fixes: #15294
* | | Merge topic 'qcc-8-cxx-lang-flag'Brad King2025-08-051-3/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ea3280f15b Merge branch 'qcc-8-cxx-lang-flag-3.31' into qcc-8-cxx-lang-flag 166061629a QCC-CXX: use `-x c++` on 8+ dc7adb64f3 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.
* | | | MSVC: Enable C23 language supportMichael Hirsch2025-07-221-0/+10
|/ / / | | | | | | | | | Introduced support via `-std:clatest` in cl 19.39.
* | | clang-cl: Add support for C23Yonggang Luo2025-07-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although there is no `cl -std:c23` flag, the underlying Clang compiler does have a C23 mode we can activate by passing `-std=c23` through a `clang-cl` wrapper flag. Also port the fix from commit 30139913e9 (VS: Restore support for mixing C++23 and C in one target with clang-cl, 2024-12-09, v3.31.3~10^2). Fixes: #27038 Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Co-authored-by: Brad King <brad.king@kitware.com>
* | | Merge topic 'link-flags'Brad King2025-06-1115-21/+20
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d592558b8b cmLocalGenerator: Drop no-op link flag placeholder infrastructure 67639002ad Ninja,Makefile: Drop now-unused placeholders from link rule variables 951e4d3f62 Ninja,Makefile: Move builtin linker flags to <LINK_FLAGS> placeholder 6b618c6079 cmLocalGenerator: Clarify MODULE link flags placeholder population c52a654aa1 cmLocalGenerator: Improve formatting of rule placeholder variable list 37cf9941ed UseEcos: Add missing placeholder in rules to link executables fa61be5bc4 Embarcadero,OpenWatcom: Clear unused flags for creating shared libraries 124e40947c CMakeCommonLanguageInclude: Do not unset MODULE library flags when empty ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !10869
| * | | Ninja,Makefile: Drop now-unused placeholders from link rule variablesBrad King2025-06-1012-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we used separate placeholders for builtin linker flags: * CMAKE_<LANG>_LINK_FLAGS for EXECUTABLEs * CMAKE_SHARED_LIBRARY_CREATE_<LANG>_FLAGS for SHARED libraries * CMAKE_SHARED_MODULE_CREATE_<LANG>_FLAGS for MODULE libraries These are now always replaced by the empty string, so drop them from our rule variables.
| * | | Embarcadero,OpenWatcom: Clear unused flags for creating shared librariesBrad King2025-06-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clear `CMAKE_SHARED_LIBRARY_CREATE_<LANG>_FLAGS` since no special link flags are needed to create a DLL with these toolchains. Our shared library creation rules do not reference the placeholder, so this variable was never used. However, we may soon teach the generators to look it up directly.
| * | | ADSP: Do not pass executable link flags when creating a static libraryBrad King2025-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was done by mistake in commit d090159318 (ENH: add support for the ADSP toolchains for Blackfin, Shark and TigerShark DSPs, patch from Raphael Cotty, 2007-07-12, v2.6.0~1446), and preserved in the generalization by commit e9eabb0dcd (ADSP: Configure compiler in compiler module, 2022-03-24, v3.24.0-rc1~331^2~1). Fix both places.
| * | | CrayPrgEnv: Drop unused static library "link" flags variableBrad King2025-06-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit c54a621b55 (Cray: New platform file for Cray Linux Environment and PrgEnv, 2015-11-13, v3.5.0-rc1~216^2~1) we populated variable `CMAKE_STATIC_LIBRARY_LINK_<LANG>_FLAGS`, but we never reference it, and the generators do not use it. Static libraries are archives, and are not produced by a linker.
| * | | GNU: Remove non-functional code in OBJCXX supportBrad King2025-06-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 9e66397c28 (Languages: Add support for Objective-C++, 2019-09-13, v3.16.0-rc1~44^2~2) we set `CMAKE_OBCXX_LINK_FLAGS`. It was a typo for `CMAKE_OBJCXX_LINK_FLAGS`, and so has not had any effect.
* | | | NVHPC: Add support for 25.07 no-pie optionRobert Maynard2025-06-091-1/+0
| | | |
* | | | NVHPC: Add support for COMPILE_OPTIONS_VISIBILITYRobert Maynard2025-06-053-0/+4
|/ / /
* | | Renesas: Add support for Renesas compilersHirofumi Nakamura2025-05-286-0/+187
| | | | | | | | | | | | | | | | | | | | | | | | - CC-RX for RX architecture - CC-RL for RL78 architecture - CC-RH for RH850 architecture Closes: #26880
* | | Clang/CXXImportStd: support `-stdlib=libstdc++`Ben Boeckel2025-04-301-19/+32
| | | | | | | | | | | | | | | Fedora 42 ships `clang` with `libstdc++` as the default. Detect and support `import std;` in this configuration.
* | | Merge topic 'automoc-predefs'Brad 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.
* | Merge topic 'clang-msvc-c++26'Brad King2025-04-221-1/+3
|\ \ | | | | | | | | | | | | | | | | | | 338f88a809 Clang: MSVC C++26 support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !10685
| * | 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
| * | 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
| * | | 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 ```
* | | | Swift: Honor COMPILE_WARNING_AS_ERROR for command-line build systemsEvan Wilde2025-04-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Define missing CMAKE_Swift_COMPILE_OPTIONS_WARNING_AS_ERROR for Swift to `-warnings-as-errors`. Fixes: #26872
* | | | HIP: Fix default flags for Debug configurationBrad King2025-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge topic 'msvc-c++23'Brad 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'Brad 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-0338-38/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` 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 ```
* | | Merge topic 'diab-compiler-support'Brad King2025-02-146-0/+82
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | 8ce6689d8b Diab: Add WindRiver Systems's Diab C/C++ toolchain Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !10276
| * | Diab: Add WindRiver Systems's Diab C/C++ toolchainSanjiv Gupta2025-02-136-0/+82
| | | | | | | | | | | | | | | | | | Teach CMake to recognize Diab versions 5.9.x.x and above. Closes: #26666
* | | 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