summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* GetSafeProperty: return std::string const&Vitaly Stakhovsky2020-04-301-1/+2
|
* cmGeneratorTarget::GetProperty: return cmPropVitaly Stakhovsky2020-04-291-71/+76
|
* Merge topic 'apple-merge-same-sysroot'Brad King2020-04-221-1/+22
|\ | | | | | | | | | | | | 3a7d1e9592 Apple: Merge per-arch sysroot parameters if all are the same Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4647
| * Apple: Merge per-arch sysroot parameters if all are the sameGregor Jasny2020-04-211-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit a9b41195d2 (Handle multi-arch sysroots on Apple platforms, 2019-07-26, v3.17.0-rc1~287^2), CMake supports "fat" builds with different sysroots. Those are passed to the compiler with the `-Xarch_<xyz>` parameter. Unfortunately this breaks the Compiler Cache (ccache) because it does not support those compiler flags: https://github.com/ccache/ccache/blob/v3.7.9/src/ccache.c#L2700-L2705 Restore the caching ability for certain "fat" build configurations (e.g. `arm64` and `armv7`) where the sysroot is the same for all selected architectures and thus a plain `-isysroot` parameter could be used.
* | CUDA: Device linking use now link optionsMarc Chevrier2020-04-191-12/+28
| | | | | | | | | | | | | | | | | | | | properties LINK_OPTIONS and INTERFACE_LINK_OPTIONS are propagated to the device link step. To control which options are selected for normal link and device link steps, the $<DEVICE_LINK> and $<HOST_LINK> generator expressions can be used. Fixes: #18265
* | Refactoring: add cm::contains to <cmext/algorithm>Marc Chevrier2020-04-171-6/+6
| |
* | Merge topic 'cuda_architectures'Brad King2020-04-161-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 21131ca60c CUDA: Add CudaOnly.CompileFlags test f0931b0790 CUDA: Convert tests to use CUDA_ARCHITECTURES e98588aaba CUDA: Add CUDA_ARCHITECTURES target property Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Patrick Stotko <stotko@cs.uni-bonn.de> Merge-request: !4568
| * | CUDA: Add CUDA_ARCHITECTURES target propertyRaul Tambre2020-04-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplifies CUDA target architecture handling. Required for Clang support as Clang doesn't automatically select a supported architecture. We detect a supported architecture during compiler identification and set CMAKE_CUDA_ARCHITECTURES to it. Introduces CMP0104 for backwards compatibility with manually setting code generation flags with NVCC. Implements #17963.
* | | Merge topic 'cmprop-source'Brad King2020-04-151-5/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | e64fa5f1b6 cmSourceFile::GetProperty: return cmProp fc223f9860 cmGlobalXCodeGenerator: Fix genex interpreter overloads Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4603
| * | | cmSourceFile::GetProperty: return cmPropVitaly Stakhovsky2020-04-141-5/+5
| |/ /
* | | Merge topic 'msbuildUtf8Support'Brad King2020-04-151-19/+24
|\ \ \ | |/ / |/| | | | | | | | | | | | | | bc877a7e94 Add support to indicate UTF-8 custom command pipe output encoding Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4587
| * | Add support to indicate UTF-8 custom command pipe output encodingJustin Goshi2020-04-131-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a flag to indicate that pipe output from a custom command should be interpreted as UTF-8 encoded. This change does not introduce a public way to set the flag, but generators that create internally-generated commands know if they are calling cmake, which uses UTF-8 pipes. MSBuild added support for interpreting output of PreBuildEvent, PreLinkEvent, PostBuildEvent, and CustomBuildStep as UTF-8. This change will appear in Visual Studio 16.6 Preview 3. It is opt-in, and you need to add the StdOutEncoding tag. MSBuild treats these as property bags so if we emit the tag for earlier versions of Visual Studio it would be safely ignored. This change emits the StdOutEncoding tag and sets it to UTF-8 whenever the custom command UTF-8 pipe flag is set. This fixes globalization issues when the output from cmake contained characters that required MSBuild to interpret as UTF-8 before displaying them.
* | | clang-tidy: address bugprone-branch-clone lintsBen Boeckel2020-04-131-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Arguably, many of these are bugs in `clang-tidy`. An if/else tree with other conditionals between cloned blocks may be relying on the intermediate logic to fall out of the case and inverting this logic may be non-trivial. See: https://bugs.llvm.org/show_bug.cgi?id=44165
* | | Merge branch 'backport-3.17-apple-arch-sysroots' into apple-arch-sysrootsBrad King2020-04-081-12/+29
|\ \ \ | |/ / |/| / | |/
| * Apple: Fix mapping CMAKE_APPLE_ARCH_SYSROOTS to custom OSX_ARCHITECTURESBrad King2020-04-081-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `CMAKE_OSX_ARCHITECTURES` value is not used directly by generators. It is used to initialize a per-target `OSX_ARCHITECTURES` property, but that property can also be set explicitly by project code to a subset of the full list of architectures. In order to handle this case, construct a mapping from each `CMAKE_OSX_ARCHITECTURES` entry to the corresponding `CMAKE_APPLE_ARCH_SYSROOTS` entry by name. Use the mapping to find the sysroot for each entry in `OSX_ARCHITECTURES` for a given target. If `CMAKE_APPLE_ARCH_SYSROOTS` does not have the same length as `CMAKE_OSX_ARCHITECTURES`, error out early rather than risking a crash or assertion failure. Fixes: #20534
| * Apple: Improve handling of missing SDKs in CMAKE_APPLE_ARCH_SYSROOTSBrad King2020-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | Use `<arch>-SDK-NOTFOUND` instead of an empty string as a placeholder in `CMAKE_APPLE_ARCH_SYSROOTS` for architectures whose SDK is not found. This ensures the length of `CMAKE_APPLE_ARCH_SYSROOTS` matches the length of `CMAKE_OSX_ARCHITECTURES`. It also makes the missing SDKs more visible in the value. Issue: #20534
* | Merge topic 'file-GetRuntimeDependencies_support_cross_compilation'Brad King2020-04-071-0/+65
|\ \ | | | | | | | | | | | | | | | | | | f867423aa2 file: GetRuntimeDependencies use CMAKE_OBJDUMP when applicable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4538
| * | file: GetRuntimeDependencies use CMAKE_OBJDUMP when applicableRobert Maynard2020-04-061-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | On machines where the gnu bin utils are prefixed, or suffixed the file(GET_RUNTIME_DEPENDENCIES ) command would fail without explicitly setting the location of objdump. Now we pre-populate the variables used to find objdump based on the gnu bin utils, so that these use cases are better supported
* | | Merge topic 'ctest-resource-file-cache'Brad King2020-04-061-0/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 060d2ce269 CTest: Add CTEST_RESOURCE_SPEC_FILE variable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4564
| * | | CTest: Add CTEST_RESOURCE_SPEC_FILE variableKyle Edwards2020-04-021-0/+6
| | | |
* | | | Merge topic 'pch-ios-multi-arch'Brad King2020-04-031-122/+156
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | f593b354da PCH: Add support for multi architecture iOS projects Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4561
| * | | PCH: Add support for multi architecture iOS projectsCristian Adam2020-04-021-122/+156
| |/ / | | | | | | | | | Fixes: #20497
* | | Merge topic 'cmprop-makefile'Brad King2020-04-021-9/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | aba23c747b cmMakefile::GetProperty: return cmProp Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4559
| * | | cmMakefile::GetProperty: return cmPropVitaly Stakhovsky2020-04-011-9/+8
| | | |
* | | | cmLocalGenerator: Avoid using upper-case config when not necessaryBrad King2020-04-011-4/+3
| | | | | | | | | | | | | | | | | | | | Calls to `GetLinkerLanguage`, `GetSourceFiles`, etc. can accept the original-case config name.
* | | | cmLocalGenerator: Clarify local variable name in GetTargetFlagsBrad King2020-04-011-12/+13
| | | |
* | | | cmLocalGenerator: Convert GetStaticLibraryFlags to take original-case configBrad King2020-04-011-5/+6
|/ / / | | | | | | | | | Move upper-case conversion of the configuration into the implementation.
* | | Merge topic 'link-libs-config-case'Brad King2020-03-311-6/+2
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | 2af18704fd Merge branch 'backport-3.16-link-libs-config-case' 3f976bf201 target_link_libraries: Fix regression in case of $<CONFIG> genex 5a95b5e091 target_link_libraries: Fix regression in case of $<CONFIG> genex Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4544
| * target_link_libraries: Fix regression in case of $<CONFIG> genexBrad King2020-03-301-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit b8626261e9 (Precompile headers: Add methods to generate PCH sources, 2019-07-13, v3.16.0-rc1~182^2~4) we look up source files for a target using an upper-case configuration even though an original-case name is sufficient. Since commit 36ded610af (PCH: Generate sources during Compute step, 2019-10-05, v3.16.0-rc1~2^2) the source file lookup is the first time we compute many on-demand structures that depend on the configuration name. This caused the `$<CONFIG>` generator expression to evaluate to the upper-case configuration name in some cases where we used original-case before. Fix this by switching the source file lookup to the original-case config name. Add a test covering the symptom that led to the discovery of this problem. Fixes: #20517
* | cmStateDirectory::GetProperty: return cmPropVitaly Stakhovsky2020-03-271-2/+2
| |
* | Merge topic 'cleanup-endls-2'Brad King2020-03-261-26/+27
|\ \ | | | | | | | | | | | | | | | | | | 1e4b5c7d09 Refactor: Avoid `std::endl` where it's not necessary (part 2) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4514
| * | Refactor: Avoid `std::endl` where it's not necessary (part 2)Alex Turbov2020-03-241-26/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `std::endl` manipulator, except inserting `\n` character, also performs `os.flush()`, which may lead to undesired effects (like disk I/O in the middle of forming data strings). For the `std::stringstream` it also has no meaning. * replace multiple `operator<<` calls on a string literal w/ the only call and the only (bigger) string literal; * replace one character string literal used in `operator<<` w/ a char literal.
* | | Merge topic 'compile-commands-collapse-whitespace'Brad King2020-03-261-2/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e565053bce Ninja: Remove unnecessary newlines in compile commands 5d4bab500e Avoid consecutive whitespace in rules d8622fbd0f Modules: Collapse consecutive whitespace in strings Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4512
| * | | Avoid consecutive whitespace in rulesDaan De Meyer2020-03-231-2/+4
| |/ /
* | | Remove redundant calls to CollapseFullPathBrad King2020-03-241-2/+2
|/ / | | | | | | | | Remove calls where it is known the input is already a collapsed full path.
* | Convert more loops to range-based for-loopsVitaly Stakhovsky2020-03-101-3/+3
|/
* Source: use std::string in place of const char*Vitaly Stakhovsky2020-01-291-4/+4
|
* add_custom_command: Fix dependency on macOS framework targetBrad King2020-01-241-1/+2
| | | | | | | | | When the `DEPENDS` option names a logical target name, convert to the "real" path of that target rather than any of the symlink-provided alternative file names. This makes the dependencies consistent with the outputs named by link rules producing the target artifacts. Fixes: #20264
* cmInstallGenerator: std::string paramsVitaly Stakhovsky2020-01-211-2/+2
| | | | | Several construction parameters converted to std::string Also made a few class members const
* cmInstall*Generator: std::string paramsVitaly Stakhovsky2020-01-211-9/+9
| | | | | Several construction parameters converted to std::string Also made a few class members const
* Merge topic 'multi-ninja-pch'Brad King2020-01-201-129/+136
|\ | | | | | | | | | | | | a55df20499 Multi-Ninja: Add precompile headers support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4201
| * Multi-Ninja: Add precompile headers supportCristian Adam2020-01-171-129/+136
| | | | | | | | Fixes: #19789
* | Merge topic 'realpath-cache'Brad King2020-01-201-2/+2
|\ \ | | | | | | | | | | | | | | | | | | 9d5a554cc9 cmGlobalGenerator: Add cache for realpath() results Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4220
| * | cmGlobalGenerator: Add cache for realpath() resultsTim Blechmann2020-01-161-2/+2
| | | | | | | | | | | | | | | Cache the results of `realpath()` system calls in `cmGlobalGenerator` to avoid repeating such calls for the same paths over and over.
* | | Merge topic 'acc-fix-in-source-depends-path'Brad King2020-01-201-2/+10
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ba3a417dce Tests/CustomCommand: add a test for depending on a `./path` e23475dc73 Tests/CustomCommand: fix custom command line to actually make its output db4780d584 cmGeneratorTarget: search for relative paths to the binary directory ec479f101f cmLocalGenerator: collapse the path after construction fd0ba705ce add_custom_command: check if a relative path should be an in-source path fd84f510f8 cmLocalGenerator: simplify the current source dir query Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4195
| * | | cmLocalGenerator: collapse the path after constructionBen Boeckel2020-01-161-0/+2
| | | | | | | | | | | | | | | | | | | | The path may contain `..` or `.` components naïvely, so compute them out before letting the generator handle them.
| * | | add_custom_command: check if a relative path should be an in-source pathBen Boeckel2020-01-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This still is broken for dependencies on generated paths where they get generated to the source directory rather than the build directory however, but there's no way to determine that is the case. Fixes: #20194
| * | | cmLocalGenerator: simplify the current source dir queryBen Boeckel2020-01-161-2/+1
| | |/ | |/|
* | | Merge topic 'pch-msvc-no-path-repetition'Craig Scott2020-01-191-1/+2
|\ \ \ | |/ / |/| | | | | | | | | | | | | | 07fe1bcd4e PCH: No repeated path for internal generated PCH files (MSVC case) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4236
| * | PCH: No repeated path for internal generated PCH files (MSVC case)Cristian Adam2020-01-161-1/+2
| | | | | | | | | | | | Fixes: #19952