summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.h
Commit message (Collapse)AuthorAgeFilesLines
* CreateRulePlaceholderExpander(): enhance memory managementMarc Chevrier2023-05-041-1/+2
| | | | This method returns now a std::unique_ptr instance rather than a raw pointer.
* Link step: use linker dependency linker fileMarc Chevrier2023-05-031-0/+6
| | | | | | Based on work done by @ben.boeckel (!8051) Fixes: #22217
* cmLocalGenerator::MayBeRelativeToWorkDir: take care of all casesMarc Chevrier2023-05-021-1/+1
|
* RULE_LAUNCH_*: Add support for generator expressionsKyle Edwards2023-02-031-1/+3
|
* cmLocalGenerator: Inline AddCompilerRequirementFlag in only call siteBrad King2022-11-181-4/+0
| | | | | | The call site in `AddLanguageFlags` is now the "one true place" for adding language standard flags. Inline the helper to reduce risk of adding other call sites later.
* cmLocalGenerator: Factor out helper to compute MSVC_DEBUG_INFORMATION_FORMATBrad King2022-10-311-0/+4
|
* CUDA: Add Device LTO support for nvccRobert Maynard2022-07-221-2/+11
| | | | Fixes #22200
* cmLocalGenerator: Adopt AppendModuleDefinitionFlag methodBrad King2022-05-311-0/+4
| | | | Migrate from `cmCommonTargetGenerator::AddModuleDefinitionFlag`.
* xcode: add support for xcconfig filesGregor Jasny2022-04-031-0/+1
| | | | Fixes: #18420
* color: Introduce CMAKE_COLOR_DIAGNOSTICS variableSemyon Kolton2022-03-081-0/+1
| | | | | | | Add a variable to control both makefile color messages and compiler color diagnostics. Fixes: #15502
* CMP0028: Report the target whose link interface has an offending itemBrad King2021-12-161-0/+5
| | | | | | | | | | | | Previously items linked via the link interface of a dependency were reported in CMP0028 messages as if directly linked by a target. Clarify the messages to indicate that an offending item is actually in the link interface of a given target, regardless of its consumer. Move the check to the end of generation and look through the final set of link implementations and link interfaces that were used for generation. This avoids repeating messages on link interfaces that have multiple consumers.
* cmCustomCommand: Track main dependency explicitlyNAKAMURA Takumi2021-12-141-3/+1
| | | | | | | Store the main dependency as the first entry in the dependency list plus a boolean member indicating its existence. Note that this slightly changes existing behavior: the main dependency was previously the last entry of the dependency list.
* cmLocalGenerator: Remove unused IncludePathStyle infrastructureBrad King2021-12-011-16/+9
| | | | | | It is unused since commit c564a3e3ff (Ninja: Always compile sources using absolute paths, 2021-05-19, v3.21.0-rc1~129^2), which left behind a FIXME comment to eventually remove it.
* cmLocalGenerator: Simplify Add{Custom,Utility}CommandNAKAMURA Takumi2021-11-181-38/+9
|
* cmMakefile: Simplify detail:::Add{Custom,Utility}CommandNAKAMURA Takumi2021-11-181-34/+11
| | | | | | | | | Note 1: `detail::AddCustomCommandToTarget()` resets cc, since cc is not moved away. Note 2: In `detail::AddUtilityCommand()`, a few vars are preserved before using. Their refs will be alive in most cases, but cc might be destroyed in the future.
* Unity Build: Fix per-config sources in multi-config generatorsBrad King2021-11-111-2/+10
| | | | | | | | | | | | | | | Single-config generators already support unity builds with per-config sources because they compute sources using `CMAKE_BUILD_TYPE` as the configuration. Each original source is either included in the unity build source, or not. Teach multi-config generators to compute the list of sources for inclusion in unity builds using all configurations. Previously they only used the empty string as the configuration. Each original source may be included in some configurations, but not others. Use preprocessor conditions to guard their inclusion when necessary. Fixes: #22892
* cmLocalGenerator: Add dedicated types to hold unity source infoBrad King2021-11-111-8/+28
|
* cmLocalGenerator: Clarify name of method to write unity source include linesBrad King2021-11-101-5/+4
|
* cmLocalGenerator: De-duplicate unity source file generationBrad King2021-11-101-0/+8
|
* CUDA: Avoid unnecessary allocation and GetLinkLanguage()Raul Tambre2021-11-071-1/+1
| | | | | There's no reason to allocate the cmNinjaLinkLineDeviceComputer on the heap. We can also assume the link language as CUDA in cmLocalGenerator::GetDeviceLinkFlags().
* Rename cmProp in cmValueMarc Chevrier2021-09-211-10/+10
|
* Refactor: reduce cmToCStr usageMarc Chevrier2021-08-191-1/+1
|
* Merge topic 'LWYU-externalization'Brad King2021-07-121-0/+2
|\ | | | | | | | | | | | | | | | | 14e57e9637 LINK_WHAT_YOU_USE feature: externalize configuration 9c5132a586 PGI: Fix "LINKER:" prefix generated separator 8a93de080c cmGeneratorTarget: Add method for LINKER: prefix translation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6306
| * LINK_WHAT_YOU_USE feature: externalize configurationMarc Chevrier2021-07-091-0/+2
| | | | | | | | | | | | | | | | Currently, this feature is only supported on ELF platforms. So, the property LINK_WHAT_YOU_USE will be ignored for other plateforms. Moreover, flags and commands are now controled by CMake variables. Fixes: #20174
* | Do not exclude include directory symlinks to entries of CPATHAlexander Grund2021-07-071-1/+1
|/ | | | | | | | | | | Extend the fix from commit 2d0b0e2b9d (Do not exclude include directories made implicit by CPATH, 2019-05-29, v3.14.5~2^2) to cover include directories that are symlinks to paths listed in `CPATH`. Compare resolved paths against resolved entries of `CPATH`. Resolve the entries as late as possible in case symlinks change. Fixes: #22383
* cmOutputConverter: Adopt relative path conversion helpersBrad King2021-05-171-13/+0
| | | | Move them up from cmLocalGenerator and out of cmStateDirectory.
* cmLocalGenerator: De-duplicate StateSnapshot memberBrad King2021-05-171-1/+0
| | | | We have the member from the cmOutputConverter parent.
* cmLocalGenerator: Remove unused MaybeRelativeToCurSrcDir methodBrad King2021-05-171-1/+0
| | | | | | | With the recent update to `GetObjectFileNameWithoutTarget`, we no longer have any call sites for `MaybeRelativeToCurSrcDir`. It does not make sense for the generator to produce paths relative to the source tree in general, so remove the method.
* cmLocalGenerator: Factor out relative path conversion helpersBrad King2021-05-131-4/+8
| | | | | | 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.
* cmLocalGenerator: Clarify GetIncludeFlags signatureBrad King2021-02-251-11/+19
| | | | | | | | | | | | | 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.
* cmCustomCommand: Record value of CMP0116 at time of creationKyle Edwards2021-02-231-10/+16
|
* Merge topic 'xcode12-ios_install_combined'Brad King2021-02-091-0/+2
|\ | | | | | | | | | | | | 0110aa018d IOS_INSTALL_COMBINED: Support Xcode 12 (command line only) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5785
| * IOS_INSTALL_COMBINED: Support Xcode 12 (command line only)Craig Scott2021-02-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xcode 12 doesn't allow nested builds within the same build directory. That means we can no longer do an install by building the install target when IOS_INSTALL_COMBINED is true. We can, however, still do an install by running the cmake_install.cmake script or executing cmake --install, since there is no outer build and therefore the associated SDK can be built as a sub-build. The non-build methods previously didn't work when IOS_INSTALL_COMBINED was true because the generated install script and the CMakeIOSInstallCombined script both made certain assumptions that relied on being part of a build. Those assumptions are now removed. A side-effect of this work is that cpack now also works from the command line when IOS_INSTALL_COMBINED is true. Relates: #21282 Fixes: #20023
* | clang-tidy: fix `readability-make-member-function-const` warningsBen Boeckel2021-01-271-1/+1
| |
* | Unity: Generate reproducible unity IDs for anonymous namespacesCraig Scott2021-01-221-0/+14
| | | | | | Fixes: #21564
* | Ninja Multi-Config: Add support for cross-config custom commandsKyle Edwards2020-12-151-1/+3
| | | | | | | | Co-Author: Brad King <brad.king@kitware.com>
* | cmLocalGenerator: Adopt custom target 'force' output name generationBrad King2020-12-151-1/+3
| |
* | cmLocalGenerator: Refactor custom command generator constructionBrad King2020-12-151-0/+4
| | | | | | | | | | | | | | Add support for constructing and using multiple generators for one custom command. cmGeneratorTarget contains a code path that needs this behavior when used with Ninja but not other generators, so use virtual dispatch through cmLocalGenerator.
* | cmMakefile: Simplify custom target 'force' output name generationBrad King2020-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary check of policy CMP0049. The policy can never trigger on our internally-generated name because it has no variable references. The rename in commit 0ed5ce4cd8 (cmTarget: Rename AddSource method for backward compatibility., 2014-03-17, v3.1.0-rc1~688^2~17) made it look like this code path depended on CMP0049. Then commit 0e1faa28cb (cmMakefile: Separate custom command setup from actual creation, 2019-09-14, v3.16.0-rc1~85^2) and commit ea1bed34b2 (cmMakefile: Extract utilities used for creation of custom commands, 2019-09-21, v3.16.0-rc1~52^2~1) built additional infrastructure to thread that dependence through the call stack. Remove it all.
* | cmLocalGenerator: Evaluate generator expressions in custom command outputsBrad King2020-12-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | Custom commands with generator expressions in their OUTPUTs or BYPRODUCTS are still attached to a single `.rule` file. We use an internal map to look up the source file holding the custom command for a given output. Populate this map using the outputs and byproducts from all configurations after evaluating the generator expressions for each configuration. Issue: #12877
* | cmLocalGenerator: Simplify custom command output cmSourceFile creationBrad King2020-12-101-4/+10
| | | | | | | | | | Move calls to `CreateGeneratedSource` over to `UpdateOutputToSourceMap`, which is called for all generated outputs and byproducts.
* | cmLocalGenerator: Factor out helper to expand custom command output pathsBrad King2020-12-101-0/+4
| |
* | cmLocalGenerator: Refactor UpdateOutputToSourceMap to avoid boolean trapBrad King2020-12-101-3/+9
| |
* | Refactoring: Makefiles Generators: Add support for various depends scannersMarc Chevrier2020-11-281-0/+7
| |
* | cmLocalGenerator::GetRuleLauncher: return cmPropvvs314152020-11-021-2/+1
| |
* | Constify some code as suggested by clang-tidyCengizhan Pasaoglu2020-10-191-2/+2
| |
* | cmLocalGenerator: Migrate custom command output lookup from cmMakefileBrad King2020-10-081-0/+73
|/ | | | | | | Since commit 777ceaea94 (cmMakefile: Delay custom command creation, 2019-10-17, v3.17.0-rc1~352^2) we process custom command declarations at generate time. Therefore we do not need to look up what source file holds the custom command producing a given output until generate time.
* CUDA: Clang separable compilationRaul Tambre2020-09-241-1/+1
| | | | | | | | | | | | For NVCC the compiler takes care of device linking when passed the "-dlink" flag. Clang doesn't support such magic and requires the buildsystem to do the work that NVCC does behind the scenes. The implementation is based on Bazel's device linking documentation: https://github.com/tensorflow/tensorflow/blob/7cabcdf073abad8c46e9dda62bb8fa4682d2061e/third_party/nccl/build_defs.bzl.tpl#L259 Closes: #20726
* Merge topic 'ispc_improvements'Brad King2020-09-081-0/+5
|\ | | | | | | | | | | | | | | a020787a9b ISPC: Support generation for multiple instruction sets 5a1750017e ISPC: Add compiler launcher support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5173
| * ISPC: Support generation for multiple instruction setsRobert Maynard2020-09-041-0/+5
| |