summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.h
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Performance: Add an index to Change cmLocalGenerator::GeneratorTargets.Aaron Orenstein2017-08-161-1/+5
| | | | | | | | | | | Add an index to Change cmLocalGenerator::GeneratorTargets for faster lookup by name. Also changed a bunch of uses of cmLocalGenerator::GetGeneratorTargets() to take const references instead of copying the vector. Represent generator targets as a map (name -> target) to make name lookups more efficient instead of looping through the entire vector to find the desired one.
* Add options for separate compile and link sysrootsBrad King2017-05-091-0/+1
| | | | | | | | | Add `CMAKE_SYSROOT_COMPILE` and `CMAKE_SYSROOT_LINK` variables to as operation-specific alternatives to `CMAKE_SYSROOT`. This will be useful for Android NDKs that compile and link with different sysroot values (e.g. `r14` with unified headers). Co-Author: Florent Castelli <florent.castelli@gmail.com>
* cmLocalGenerator: Add a hook for compiler flags used at link timeBrad King2017-05-011-0/+4
| | | | | | | | | | | | When using a compiler to drive linking we add compiler flags from `CMAKE_<LANG>_FLAGS` in case they affect the way the compiler invokes the linker, but we don't add flags from other places that are meant only for compiling sources. Rather than calling the `AddLanguageFlags` method (which is used to add flags for compiling sources) directly, add an intermediate method that is used when adding the flags for linking. This will give us a way to add language-specific compiler flags needed when driving the linker in the same place on the command line as other compiler flags go.
* Features: Refactor <LANG>_STANDARD updateBrad King2017-05-011-0/+2
| | | | | | | | | In order to support generator expressions in target COMPILE_FEATURES we apply them at generate time. Move this step to the beginning of generation instead of doing it on demand while collecting flags. This avoids repeating the process unnecessarily, and will then allow `cmLocalGenerator::AddCompilerRequirementFlag` to be used any time during generation.
* Clang IPO (LTO) supportRuslan Baratov2017-04-281-0/+3
|
* Add IPO compiler flags more consistently in generatorsBrad King2017-04-271-2/+2
| | | | | | Move addition of IPO flags into `cmLocalGenerator::AddLanguageFlags` because all call sites of that need the IPO flags, but not all were following the call with `AppendFeatureOptions`.
* CUDA: Allow sources to be compiled to .ptx filesRobert Maynard2017-04-201-1/+2
| | | | | When the target property `CUDA_PTX_COMPILATION` is enabled CUDA OBJECT libraries will generate ptx files instead of object files.
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-2/+2
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'