summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'LWYU-externalization'Brad King2021-07-121-0/+24
|\ | | | | | | | | | | | | | | | | 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/+24
| | | | | | | | | | | | | | | | 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-3/+13
| | | | | | | | | | | | | | | | | | | | | | 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
* | cmLocalGenerator: Simplify CPATH lookup loopAlexander Grund2021-07-071-3/+2
| |
* | cmLocalGenerator: Clarify check for membership in multiple setsAlexander Grund2021-07-071-3/+3
| |
* | cmLocalGenerator: Remove unnecessary parentheses in a conditionAlexander Grund2021-07-071-4/+4
| |
* | cmLocalGenerator: Store realpath lookup result in a variableAlexander Grund2021-07-071-2/+3
| |
* | cmLocalGenerator: Factor out repeated condition into local variableAlexander Grund2021-07-061-3/+4
|/
* Compiler/MSVC: use the `-external:I` flag for system includesBen Boeckel2021-06-181-0/+8
| | | | See: #17904
* HIP: Add language to CMakeRobert Maynard2021-06-071-5/+7
|
* add_custom_command: Target-dependent generator expression supportRaul Tambre2021-05-311-0/+1
| | | | | | | | | OUTPUT variant with a TARGET given to allow resolving target-based generator expressions wouldn't work because OUTPUT is resolved before generator targets are created, i.e. FindGeneratorTargetToUse() returns nullptr. This is a known limitation, see #21364. Implements #21336.
* install: Implement new install(CODE|SCRIPT) option ALL_COMPONENTSNils Gladitz2021-05-191-2/+2
| | | | | | | | | | | In a per-component installation the generated installation scripts are invoked once for each component. Per default custom installation script code added by install(CODE|SCRIPT) only runs for one specific component in this context. The new ALL_COMPONENTS option allows custom script code to be run once for each component being installed.
* cmOutputConverter: Adopt relative path conversion helpersBrad King2021-05-171-19/+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-6/+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: Localize logic mapping source path to object file nameBrad King2021-05-171-2/+19
| | | | | | | | We select an object file name based on the path to its source file. Localize the logic for shortening this via relative paths. It does not need to use the generator-wide relative path conversion rules because we are not actually generating a relative path that needs to be consistent with anything else.
* INTERFACE_POSITION_INDEPENDENT_CODE must be transitive for OBJECT libraryMarc Chevrier2021-05-141-7/+0
| | | | Fixes: #22174
* cmLocalGenerator: Factor out relative path conversion helpersBrad King2021-05-131-9/+23
| | | | | | 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.
* cmStateDirectory: Rename ConvertToRelPathIf{Not => }ContainedBrad King2021-05-121-1/+1
| | | | The "Not" in the method name is backward from its logic.
* Source: Minor code improvementsVitaly Stakhovsky2021-05-111-1/+1
|
* Source: Remove unnecessary comparisons to nullptrVitaly Stakhovsky2021-05-101-3/+3
|
* Source: Fix typos and spelling in commentsJosef Angstenberger2021-05-071-3/+3
|
* Merge topic 'objc-osx-architectures'Brad King2021-05-061-1/+1
|\ | | | | | | | | | | | | 5972094708 ObjectiveC: Respect OSX_ARCHITECTURES for OBJC Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6090
| * ObjectiveC: Respect OSX_ARCHITECTURES for OBJCBrad King2021-05-051-1/+1
| | | | | | | | | | | | | | Fix a typo from commit 940fc62962 (macOS: Respect OSX_ARCHITECTURES for ASM, 2020-08-21, v3.19.0-rc1~270^2). Fixes: #22152
* | Per-language Win32/Console flagsRaul Tambre2021-03-171-4/+4
| | | | | | | | | | | | | | | | Allows using different compilers with different flags for different languages. For example Clang with GNU-like commandline for CXX and MSVC as host compiler for CUDA. Should help with #21914.
* | cmLocalGenerator: Clarify GetIncludeFlags signatureBrad King2021-02-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge topic 'autogen-cmp0116-fix'Brad King2021-02-241-26/+37
|\ \ | |/ | | | | | | | | | | | | | | | | | | 339dbc901f Help: Note that CMP0116 is recorded at the time of CC creation e3740e020e Tests: Test Qt autogen target with CMP0116 set to WARN cf34011ce7 Tests: Test per-CC behavior of CMP0116 3a95503512 Ninja: Use CMP0116 status recorded at time of custom command's creation f01f10e8fb cmCustomCommand: Record value of CMP0116 at time of creation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5848
| * cmCustomCommand: Record value of CMP0116 at time of creationKyle Edwards2021-02-231-26/+37
| |
* | PCH PDB: Fix misuse of IS_NEWER_THAN in timestamp checkCraig Scott2021-02-221-2/+3
|/ | | | | | | When using a file system which only has second resolution timestamps, there is a reasonably high likelihood of timestamps being the same. The IS_NEWER_THAN test returns true when timestamps are the same, so don't retry copying the PCH PDB file when they match exactly.
* 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
| * Merge topic 'ispc_control_header_suffixes' into release-3.19Brad King2020-12-151-4/+12
| |\ | | | | | | | | | | | | | | | | | | c9a50f3556 ISPC: Generated Headers suffix configurable with a better default Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5597
* | | PCH: Remove restrictions for REUSE_FROM signature for MSVCCristian Adam2021-02-021-7/+16
| | | | | | | | | | | | Fixes: #20201
* | | Revert "PCH: Remove restrictions for REUSE_FROM signature for MSVC"Brad King2021-02-021-16/+7
| | | | | | | | | | | | | | | This reverts commit 9f060971411aca979807f70307d8b9fe1b43ff24. It was merged accidentally.
* | | PCH: Remove restrictions for REUSE_FROM signature for MSVCCristian Adam2021-02-021-7/+16
| | | | | | | | | | | | Fixes: #20201
* | | clang-tidy: fix `readability-use-anyofallof` warningsBen Boeckel2021-01-271-26/+18
| | |
* | | clang-tidy: fix `readability-qualified-auto` warningsBen Boeckel2021-01-271-4/+4
| | |
* | | 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-10/+25
| | | | | | | | | Fixes: #21564
* | | Code style: add missed explicit 'this->'Oleksandr Koval2021-01-051-4/+4
| | | | | | | | | | | | | | | CMake uses explicit 'this->' style. Using custom clang-tidy check we can detect and fix places where 'this->' was missed.
* | | Merge topic 'unity-anon-ns'Craig Scott2020-12-161-3/+14
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 0fe9c40494 Unity Build: Add option for generating per-file unique id Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4784
| * | | Unity Build: Add option for generating per-file unique idStephen Kelly2020-12-151-3/+14
| | | | | | | | | | | | | | | | Fixes: #21477
* | | | Merge topic 'custom-command-output-genex-nmc'Brad King2020-12-161-8/+33
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1526ae3aba Tests: Add cases for Ninja Multi-Config cross-config custom commands dcf9f4d2f7 Ninja Multi-Config: Add support for cross-config custom commands 15467f12f7 cmLocalGenerator: Adopt custom target 'force' output name generation 7b64b0cd5a cmLocalGenerator: Refactor custom command generator construction d29da8ed3e cmMakefile: Simplify custom target 'force' output name generation 2b1cc175ee Help: Clarify version adding add_custom_{command,target} OUTPUT genex support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5612
| * | | | Ninja Multi-Config: Add support for cross-config custom commandsKyle Edwards2020-12-151-2/+4
| | | | | | | | | | | | | | | | | | | | Co-Author: Brad King <brad.king@kitware.com>
| * | | | cmLocalGenerator: Adopt custom target 'force' output name generationBrad King2020-12-151-6/+22
| | | | |
| * | | | cmLocalGenerator: Refactor custom command generator constructionBrad King2020-12-151-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-5/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge topic 'ispc_control_header_suffixes'Brad King2020-12-151-4/+12
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | c9a50f3556 ISPC: Generated Headers suffix configurable with a better default Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5597
| * | | ISPC: Generated Headers suffix configurable with a better defaultRobert Maynard2020-12-141-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The target property `ISPC_HEADER_SUFFIX` and associated global variable now can control the suffix used when generating the C/C++ interoperability ISPC headers. In addition the default suffix is now "_ispc.h" which matches the common convention that the ISPC compiler team uses and recommends.
* | | | Merge topic 'support_CMAKE_VFS_OVERLAY_for_rc_compilation'Brad King2020-12-151-4/+16
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/| | | | | | | 18ee6d7e32 llvm-rc: Add CMAKE_VFS_OVERLAY to the preprocessing flags Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5604