summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Add generator expression support to static code analysis hooksStefan Schober2023-03-271-5/+38
| | | | | | Teach target properties `<LANG>_CPPCHECK`, `<LANG>_CPPLINT`, `<LANG>_CLANG_TIDY` and `<LANG>_INCLUDE_WHAT_YOU_USE` to accept generator expressions.
* cmGeneratorTarget: Pass language to GetAppleArchs when possibleBrad King2023-03-151-2/+2
|
* cmGeneratorTarget: Convert GetAppleArchs output argument to return valueBrad King2023-03-151-4/+4
|
* Merge topic 'support_cubin_fatbin_optix_cuda_output'Brad King2023-03-141-5/+18
|\ | | | | | | | | | | | | | | 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
| * CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilationRobert Maynard2023-03-131-5/+18
| |
* | Makefile: Don't pass the CUDA compiler response files with UTF8_BOMRobert Maynard2023-02-281-10/+12
|/ | | | Fixes #24544
* RULE_LAUNCH_*: Add support for generator expressionsKyle Edwards2023-02-031-3/+4
|
* Merge topic 'lang-linker-launcher-genex'Brad King2023-02-031-1/+2
|\ | | | | | | | | | | | | | | | | 33e27f6ca6 <LANG>_LINKER_LAUNCHER: Allow generator expressions 84ada0b0c9 <LANG>_COMPILER_LAUNCHER: Expand subset of genexes that can be evaluated Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8152
| * <LANG>_COMPILER_LAUNCHER: Expand subset of genexes that can be evaluatedKyle Edwards2023-02-021-1/+2
| |
* | cmCommonTargetGenerator: classify linked target directories by languageBen Boeckel2023-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These directories are used to direct collators for Fortran and C++ modules to consume dependent module information to properly collate. However, the consumption of these files merely checks for existence of the file, not whether they are actually needed anymore. The problem arises when a target has Fortran or C++ modules at point A, a build occurs populating this file, and then the target is updated to no longer have potential modules. The `DependInfo.make` (for `Makefiles`) or `<LANG>DependInfo.json` (for `Ninja`) files still exist as they are never guaranteed to be cleaned up. This can introduce stale information to the build which may cause a false-positive compilation if a module file happens to still exist and gets found this way. Instead, query the `linked-target-dirs` using the language in question and only add the directory if it contains potential sources for modules coming from the language in question.
* | cmMakefileTargetGenerator: make "target linked info" variable Fortran-specificBen Boeckel2023-02-011-1/+1
| | | | | | | | This variable is Fortran-specific, so clarify that through its name.
* | cmMakefileTargetGenerator: simplify string streamingBen Boeckel2023-02-011-2/+2
|/
* Watcom: Fix double-quote to be single-quote in response files for wlinkJiri Malak2023-01-261-5/+10
| | | | | Response files contained double-quote for any response file, but response files for wlink must contains single-quote. This is fix for libraries list response file. Problem for object file list was fixed by MR !8115
* clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR propertyKyle Edwards2022-12-061-1/+23
| | | | Fixes: #21362
* Makefiles: Name object response files with .rsp extensionFelipe Torrezan2022-11-211-0/+1
| | | | | | | This is more consistent with the Ninja generator, and is necessary for the IAR linker to recognize the argument as a response file. Fixes: #24165
* EXPORT_COMPILE_COMMANDS: add `output` fieldBen Boeckel2022-10-281-1/+1
| | | | | | | | Also write for all configurations from multi-config generators. This field was added in the Clang 5 documentation and not present in the Clang 4 documentation (sometime between Dec 2016 and Mar 2017 according to `web.archive.org`).
* COMPILER_LAUNCHER: Add support for generator expressionsThomas Weißschuh2022-08-301-2/+4
| | | | Fixes: #23441
* Merge topic 'cpp-named-module-file-sets'Brad King2022-06-171-0/+65
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 07bc3b07ec gitlab-ci: test C++ modules using GCC 1b2270aa4e ci: add a Docker image to test out C++ modules with GCC 8c5a53096a Tests/RunCMake/CXXModules: add module-using examples 4151547e2f cmGlobalNinjaGenerator: use `cmModuleMapper` implementation b43bdaff3c cmCxxModuleMapper: implement support for GCC's module map format 02d0f0e752 cmCxxModuleMapper: add source to handle module mapper contents a046a45aad cmGlobalNinjaGenerator: add a TODO for header units 386465bf83 cmTarget: add support for C++ module fileset types ... Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7369
| * cmTarget: add support for C++ module fileset typesBen Boeckel2022-06-161-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C++ modules have two variants which are of importance to CMake: - `CXX_MODULES`: interface modules (those using `export module M;`, `export module M:part;`, or `module M:internal_part;`) - `CXX_MODULE_HEADER_UNITS`: importable header units Creating C++ modules or partitions are *not* supported in any other source listing. This is because the source files must be installed (so their scope matters), but not part of usage requirements (what it means for a module source to be injected into a consumer is not clear at this moment). Due to the way `FILE_SET` works with scopes, they are a perfect fit as long as `INTERFACE` is not allowed (which it is not).
* | CUDA: Support response files with nvccRobert Maynard2022-06-131-30/+35
|/
* Provide guidance when trying to use non-enabled languageRobert Maynard2022-05-041-5/+9
| | | | Fixes #23463
* Merge topic 'nmake-rsp-encoding'Brad King2022-01-271-2/+15
|\ | | | | | | | | | | | | | | | | d5ee6d50ee NMake: Use UTF-8 BOM in response files only with MSVC tooling cab631c2e2 NMake: Document response file encoding heuristic in a comment Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6905
| * NMake: Use UTF-8 BOM in response files only with MSVC toolingBrad King2022-01-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | Since commit f3f57cc4ed (NMake: Use UTF-8 with BOM if supported by nmake, 2021-04-22, v3.21.0-rc1~217^2), we add a BOM to response files to tell MSVC tooling that they are encoded as UTF-8. However, the "NMake Makefiles" generator may also be used with non-MSVC toolchains that do not understand the BOM. Update the response file encoding selection heuristic to add the BOM only with MSVC tooling. Fixes: #23143
| * NMake: Document response file encoding heuristic in a commentBrad King2022-01-261-2/+10
| | | | | | | | | | | | | | | | Since commit f3f57cc4ed (NMake: Use UTF-8 with BOM if supported by nmake, 2021-04-22, v3.21.0-rc1~217^2) the encoding of response files is selected based on the makefile encoding. In principle these may be orthogonal, but in practice it is a useful heuristic. Call out this heuristic in a comment, and leave a FIXME to do something better.
* | Merge topic 'makefile-CMAKE_EXPORT_COMPILE_COMMANDS-HIP'Brad King2021-12-071-1/+1
|\ \ | | | | | | | | | | | | | | | | | | b59f7600c4 HIP: Enable CMAKE_EXPORT_COMPILE_COMMANDS for HIP Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6789
| * | HIP: Enable CMAKE_EXPORT_COMPILE_COMMANDS for HIPBrad King2021-12-071-1/+1
| | | | | | | | | | | | Fixes: #22986
* | | CUDA: Support CMP0105 on ClangRaul Tambre2021-11-081-0/+4
| | | | | | | | | | | | | | | | | | | | | Add link flags during the "device compile" step. Enabled the relevant tests. The disable reasons regarding separable compilation were outdated and the actual failure case was device link flags support.
* | | CUDA: Use local shorthands for variables in Clang device link codeRaul Tambre2021-11-071-14/+12
| | | | | | | | | | | | Helps reduce wrapping of lines making code more readable.
* | | Source: Replace most calls to sprintf with snprintfSean McBride2021-10-251-1/+1
| | |
* | | CUDA: Allow both CUDA_SEPARABLE_COMPILATION and CUDA_PTX_COMPILATIONRobert Maynard2021-10-201-15/+18
|/ / | | | | | | | | | | The target properties `CUDA_SEPARABLE_COMPILATION` and `CUDA_PTX_COMPILATION` now aren't mutually exclusive and can now be used together on the same target.
* | Source: Fix clang -Wimplicit-fallthrough warningsSean McBride2021-09-281-0/+1
| |
* | Rename cmProp in cmValueMarc Chevrier2021-09-211-35/+36
| |
* | IWYU: Add `--driver-mode=cl` when applicablePigeonF2021-09-101-1/+19
| | | | | | | | | | | | We already do this for `clang-tidy`. Fixes: #16554
* | Refactor: reduce cmToCStr usageMarc Chevrier2021-08-191-4/+3
| |
* | Merge branch ↵Marc Chevrier2021-08-011-2/+20
|\ \ | |/ | | | | 'backport-3.21-CC-DEPFILE-independent-from-CMAKE_DEPENDS_USE_COMPILER' into CC-DEPFILE-independent-from-CMAKE_DEPENDS_USE_COMPILER
| * add_custom_command(DEPFILE) independent from CMAKE_DEPENDS_USE_COMPILERMarc Chevrier2021-08-011-2/+20
| | | | | | | | Fixes: #22486
* | Merge topic 'cuda_separable_clang_make'Brad King2021-07-291-19/+23
|\ \ | |/ | | | | | | | | | | | | 3975678fcc CUDA/Clang: Simplify --register-link-binaries logic 0b1cea66cd CUDA/Clang: Fix separable compilation in non-root directories with Makefiles Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6400
| * CUDA/Clang: Simplify --register-link-binaries logicroot2021-07-291-10/+10
| | | | | | | | | | | | | | Move the logic for appending cubin afterwards, so the check can simply be empty(). With the Makefile generator the option is now at the front instead of being intermixed with the actual bins.
| * CUDA/Clang: Fix separable compilation in non-root directories with Makefilesroot2021-07-291-10/+14
| | | | | | | | | | | | | | | | Seems the relative paths were wrong basically all around such that only compiling files in the top-level directory would work. I've modified CudaOnly.SeparateCompilation to cover this. Fixes #22482.
* | Makefiles: Add support for building Fortran intrinsicsIsuru Fernando2021-06-241-0/+7
|/ | | | Fixes: #21463
* HIP: Add language to CMakeRobert Maynard2021-06-071-1/+2
|
* Merge topic 'fix-compile-db-crash'Brad King2021-05-291-2/+5
|\ | | | | | | | | | | | | 316cbbe8d5 Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6173
| * Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile ruleBrad King2021-05-281-2/+5
| | | | | | | | | | | | | | | | | | | | Extend the fix from commit 67e2130c96 (Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule, 2020-11-20, v3.19.1~8^2) to work for the `<FLAGS>` placeholder too. Also fix the test case to actually enable `EXPORT_COMPILE_COMMANDS` on the test target. Fixes: #22261
* | cmOutputConverter: Adopt relative path conversion helpersBrad King2021-05-171-10/+2
| | | | | | | | Move them up from cmLocalGenerator and out of cmStateDirectory.
* | cmLocalGenerator: Factor out relative path conversion helpersBrad King2021-05-131-71/+42
| | | | | | | | | | | | Most calls to `MaybeConvertToRelativePath` use one of our common work directories (e.g. top of the build tree) as the local path. Add helpers for each of the common cases to simplify and clarify call sites.
* | cmMakefileTargetGenerator: Clarify name of relative path conversion helperBrad King2021-05-131-6/+6
| |
* | Source: Remove unnecessary comparisons to nullptrVitaly Stakhovsky2021-05-101-1/+1
| |
* | NMake: Use UTF-8 with BOM if supported by nmakeAmine Najahi2021-05-051-1/+2
| | | | | | | | Fixes: #21792
* | cmLocalGenerator: Simplify some GetIncludeFlag call sitesBrad King2021-02-251-3/+2
| | | | | | | | | | The path style argument is meaningful only with the Ninja generator, so drop it from call sites in Makefile and Xcode generators.
* | cmLocalGenerator: Clarify GetIncludeFlags signatureBrad King2021-02-251-3/+4
|/ | | | | | | | | | | | | Make the `config` argument non-optional so all callers must be explicit. Convert the path style argument to an enumeration to make its role clear at call sites. The path style argument is implemented by `ConvertToIncludeReference`, which was introduced with the Ninja generator by commit 5b114c9bee (Introduce a cmLocalGenerator::ConvertToIncludeReference function, 2011-09-07, v2.8.7~187^2~4). Its only purpose is to allow the Ninja generator to use relative paths in `-I` flags. Add a comment explaining this role.