summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.h
Commit message (Collapse)AuthorAgeFilesLines
* 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
* cmLocalGenerator: Extend the functionality of ``GetIncludeDirectories()``Sebastian Holtermann2018-07-251-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What ``cmLocalGenerator::GetIncludeDirectories`` does ----------------------------------------------------- In general it concatenates the 1. ``target->GetIncludeDirectories(LANG)`` and the 2. ``CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES``. Additionally it performs some sorting and special treatment of the - ``CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES``. By default all ``CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES`` are stripped from the result list. When explicitly requested (by setting ``stripImplicitInclDirs=false``) *some* implicit directories are appended to the result list. The implicit directories that *are* appended are those that were requested to be included by 1. ``target->GetIncludeDirectories(LANG)`` or 2. ``CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES``. All other implicit directories are still stripped from the result list. The reason to not simply append all implicit directories is that Qt4's moc has problems to parse some headers that might be found in the implicit system include directories (See commit d2536579d51e77827b8e55f39123316324314781 and [QTBUG-28045](https://bugreports.qt.io/browse/QTBUG-28045) ). That has been solved in Qt5's moc though. Extension request to ``cmLocalGenerator::GetIncludeDirectories`` ---------------------------------------------------------------- For Qt5's moc we like to have an option that allows to append *all* implict include directories to the result list, not just those that were user requested. Changes to ``cmLocalGenerator::GetIncludeDirectories`` ------------------------------------------------------ - Shorten the function parameter name ``stripImplicitInclDirs`` to ``stripImplicitDirs``. - Add new boolean function parameter ``appendAllImplicitDirs`` with a default value ``false``. The old default behavior of the function stays the same, but a specialized behavior can be requested by AUTOMOC for Qt4/Qt5 respectively.
* Order SYSTEM include directories after non-system directoriesEphi Sinowitz2018-04-231-0/+4
| | | | | | | An effect of the `-isystem` flag is to search the directory after those specified via `-I` flags. Make behavior more consistent on compilers that do not have any `-isystem` flag by explicitly moving system include directories to the end.
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-2/+2
| | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* cmLocalGenerator: change ImportedGeneratorTargets from vector to mapFrank Winklmeier2018-01-301-1/+1
| | | | | | | | For large number of targets significant amount of time is spent in cmLocalGenerator::FindGeneratorTargetToUse, which uses find_if on a vector to locate the given target. Using a map instead of vector for ImportedGeneratorTargets (as done for cmMakefile::ImportedTargets) provides a significant speedup (up to factor of 2).
* cmLocalGenerator: remove public GetImportedGeneratorTargetsFrank Winklmeier2018-01-301-5/+0
| | | | | GetImportedGeneratorTargets is not used anywhere hence remove it to avoid exposing the type of ImportedGeneratorTargets.
* sourceFile properties: add property INCLUDE_DIRECTORIESMarc Chevrier2018-01-241-0/+17
|
* LocalGenerator: refactoringMarc Chevrier2018-01-231-3/+20
| | | | | Introduce method AppendCompileOptions to support future source file property COMPILE_OPTIONS.
* IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+1
| | | | Also remove `#include "cmConfigure.h"` from most source files.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-3/+3
|
* Use C++11 unordered containersDaniel Pfeifer2017-08-221-2/+3
|