summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.h
Commit message (Collapse)AuthorAgeFilesLines
* Multi-Ninja: Fix reusable PCHs for MSVCCristian Adam2020-05-271-0/+5
| | | | Fixes: #20721
* Refactoring: Third-parties public headers are under cm3p prefixMarc Chevrier2020-05-071-1/+1
| | | | Fixes: #20666
* Merge topic 'apple-merge-same-sysroot'Brad King2020-04-221-0/+2
|\ | | | | | | | | | | | | 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-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+5
| | | | | | | | | | | | | | | | | | | | 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
* | Merge topic 'msbuildUtf8Support'Brad King2020-04-151-7/+11
|\ \ | | | | | | | | | | | | | | | | | | 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-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'backport-3.17-apple-arch-sysroots' into apple-arch-sysrootsBrad King2020-04-081-0/+1
|\ \ \ | |/ / |/| / | |/
| * Apple: Fix mapping CMAKE_APPLE_ARCH_SYSROOTS to custom OSX_ARCHITECTURESBrad King2020-04-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | PCH: Add support for multi architecture iOS projectsCristian Adam2020-04-021-6/+7
|/ | | | Fixes: #20497
* Source: use std::string in place of const char*Vitaly Stakhovsky2020-01-291-14/+2
|
* Ninja: Add multi-config variantKyle Edwards2019-12-131-0/+1
| | | | Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
* cmMakefile: Delay custom command creationDaniel Eiband2019-11-241-0/+91
| | | | | | | | Move custom command creation to cmLocalGenerator and dispatch custom commands in cmMakefile to generate time. Generators add custom commands using the new methods provided by cmLocalGenerator. Issue: #12877
* cmLocalGenerator: modernize memory managementMarc Chevrier2019-11-111-5/+8
|
* PCH: Generate sources during Compute stepCristian Adam2019-10-091-2/+1
|
* file(GENERATE): Create output file structures even earlierBrad King2019-10-071-0/+1
| | | | | | | | | | | | | | Since commit b80557c7bd (file(GENERATE): Evaluate early to allow generating source files, 2014-11-04, v3.2.0-rc1~398^2) we create the `cmSourceFile` instances marked with a `GENERATED` source file property before tracing source dependencies. Move it to even earlier so that steps in `cmGlobalGenerator::AddAutomaticSources` can operate on all sources. This also avoids the accidental `O(n^2)` calls for `n` local generators that we had previously. This is also needed since commit 83c1657ff7 (Unity build: Generate sources during Compute step, 2019-10-03) to support `file(GENERATE)` outputs as sources in a target with `UNITY_BUILD` enabled.
* Unity build: Generate sources during Compute stepBrad King2019-10-031-1/+1
| | | | | | | | The unity build sources need to be added for all generators. Create them during `cmGlobalGenerator::Compute` to avoid duplicating the calls in every generator. We already handle Qt autogen there too. Issue: #19789
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-1/+2
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* fileapi: add backtraces for LINK_PATH and LINK_DIRECTORIESJustin Goshi2019-09-181-6/+5
|
* cmLocalGenerator: Add OutputLinkLibraries overload with backtracesJustin Goshi2019-09-181-0/+5
|
* cmLocalGenerator: Add GetTargetCompileFlags overload with backtracesJustin Goshi2019-09-101-0/+3
|
* cmLocalGenerator: Add GetTargetFlags overload with backtracesJustin Goshi2019-09-101-0/+6
|
* cmLocalGenerator: Add GetStaticLibraryFlags overload with backtracesJustin Goshi2019-09-101-0/+3
|
* cmLocalGenerator: Add AddCompileOptions overload with backtracesJustin Goshi2019-09-101-0/+3
|
* cmLocalGenerator: Add AppendCompileOptions overload with backtracesJustin Goshi2019-09-101-0/+3
|
* cmLocalGenerator: Add AppendFlags overload with backtracesJustin Goshi2019-09-091-0/+2
|
* Merge topic 'use-using'Brad King2019-09-061-2/+2
|\ | | | | | | | | | | | | | | 1d3f5ebb0d clang-tidy: Enable check modernize-use-using a1ddf2d0ba clang-tidy: Replace typedef with using Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3782
| * clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-041-2/+2
| | | | | | | | | | | | | | | | Automate the conversion with perl -i -0pe 's/typedef ([^;]*) ([^ ]+);/using $2 = $1;/g' then manually fix a few places.
* | cmLocalGenerator: Remove AppendFlags 'const char*' overloadBrad King2019-09-051-1/+0
| | | | | | | | | | Update call sites to ensure the `std::string` argument can be constructed safely.
* | Unity build: Add support for Ninja and Makefile generatorsCristian Adam2019-08-291-0/+1
|/
* Precompile headers: Add methods to generate PCH sourcesCristian Adam2019-08-281-0/+2
| | | | Co-Author: Daniel Pfeifer <daniel@pfeifer-mail.de>
* Refactor: Convert all instances of CMAKE_BUILD_WITH_CMAKE to CMAKE_BOOTSTRAPKitware Robot2019-08-091-1/+1
|
* Merge topic 'implicit-includes-CPATH'Brad King2019-05-311-0/+2
|\ | | | | | | | | | | | | 2d0b0e2b9d Do not exclude include directories made implicit by CPATH Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3395
| * Do not exclude include directories made implicit by CPATHBrad King2019-05-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Entries of the `CPATH` environment variable are implicitly searched as include directories by some C/C++ compilers. Since commit 5990ecb741 (Compute implicit include directories from compiler output, 2018-12-07, v3.14.0-rc1~108^2) these entries are detected by CMake and included in the `CMAKE_{C,CXX}_IMPLICIT_INCLUDE_DIRECTORIES` variables. However, we should not exclude them from explicit specification via `-I` or particularly `-isystem` because they are meant as user-specified include directories that can be re-ordered without breaking compiler builtin headers. In particular, we need explicit requests via `include_directories` with the `SYSTEM` option to result in `-isystem` so that third-party headers do not produce warnings. Co-Author: Ben Boeckel <ben.boeckel@kitware.com> Fixes: #19291
* | Fix invalid ///! doxygen comment line startsSebastian Holtermann2019-03-311-6/+6
| | | | | | | | | | In various places `///!` was used to start a comment line. This is not valid Doygen syntax. This patch replaces `///!` comment starts with `//!`.
* | cmMakefile::ConfigureFile: Accept `std::string` parametersVitaly Stakhovsky2019-02-191-2/+2
|/
* Merge topic 'cmoutputconverter-simplify'Brad King2019-01-291-0/+10
|\ | | | | | | | | | | | | b6a957c969 cmOutputConverter: move ConvertToRelativePath to cmStateDirectory. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2831
| * cmOutputConverter: move ConvertToRelativePath to cmStateDirectory.Bruno Manganelli2019-01-271-0/+10
| |
* | cmLocalGenerator: Simplify `GetIncludeDirectories`Sebastian Holtermann2019-01-281-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch strips the `stripImplicitDirs` and `appendAllImplicitDirs` parameters from the `cmLocalGenerator::GetIncludeDirectories` method and makes it a wrapper into the new `cmLocalGenerator::GetIncludeDirectoriesImplicit` method. `cmLocalGenerator::GetIncludeDirectoriesImplicit` is the renamed old implementation of `cmLocalGenerator::GetIncludeDirectories` and still accepts `stripImplicitDirs` and `appendAllImplicitDirs`. The motivation is that there's only *one* case where `cmLocalGenerator::GetIncludeDirectories` is called with the `stripImplicitDirs` parameter being `false` (QtAutoGen), but many other places where it is called using the `true` default value. QtAutoGen is modified to use `cmLocalGenerator::GetIncludeDirectoriesImplicit` directly. In two use cases of `cmLocalGenerator::GetIncludeDirectories` the manually set `true` value for `stripImplicitDirs` is removed.
* | cmLocalUnixMakefileGenerator3: more methods accept std::stringVitaly Stakhovsky2019-01-221-2/+2
|/
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-2/+3
| | | | Reduce the number of files relying on `cmake.h`.
* POSITION_INDEPENDENT_CODE: Manage link flags for executablesMarc Chevrier2018-11-111-0/+4
| | | | Fixes: #14983, #16561
* cmLocalGenerator::AppendDefines: Remove const char* overloadsVitaly Stakhovsky2018-10-261-12/+2
| | | | Accept const std::string& arguments only
* Add generator APIs to get build settings with backtracesBrad King2018-10-181-2/+16
| | | | | | In cmGeneratorTarget and cmLocalGenerator we offer several APIs to get build settings like include directories, compile definitions, source files, etc. Add corresponding APIs that include backtrace information.
* cmLocalGenerator: Make MoveSystemIncludesToEnd file-localBrad King2018-10-181-4/+0
|
* cmLocalGenerator: Remove AddCompileDefinitions methodBrad King2018-10-101-4/+0
| | | | | | | This method offers the same definitions as `GetTargetDefines` except that it excludes the "export" macro on shared libraries. Update call sites to use `GetTargetDefines` instead. Some of them were incorrectly excluding the export macro.
* Replace occurrences of "Mac OS X" with "macOS" in commentsBartosz Kosiorek2018-09-101-2/+2
| | | | | | | | Apple's main Operating system changed their name from OS X to macOS: https://www.engadget.com/2016/06/13/os-x-is-now-macos/ Revise source comments accordingly.
* Merge topic 'lg-directory'Brad King2018-08-281-2/+2
|\ | | | | | | | | | | | | 50fbfee3a0 cmLocalGenerator: return directories as const std::string& Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2309
| * cmLocalGenerator: return directories as const std::string&Vitaly Stakhovsky2018-08-271-2/+2
| |
* | static library: add property STATIC_LIBRARY_OPTIONSMarc Chevrier2018-08-151-0/+1
|/ | | | issue: #18251