| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| | |
b6a957c969 cmOutputConverter: move ConvertToRelativePath to cmStateDirectory.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2831
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|
|
|
| |
Reduce the number of files relying on `cmake.h`.
|
|
|
|
| |
Fixes: #14983, #16561
|
|
|
|
| |
Accept const std::string& arguments only
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| | |
50fbfee3a0 cmLocalGenerator: return directories as const std::string&
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2309
|
| | |
|
|/
|
|
| |
issue: #18251
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
GetImportedGeneratorTargets is not used anywhere hence remove it
to avoid exposing the type of ImportedGeneratorTargets.
|
| |
|
|
|
|
|
| |
Introduce method AppendCompileOptions to support
future source file property COMPILE_OPTIONS.
|
|
|
|
| |
Also remove `#include "cmConfigure.h"` from most source files.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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 `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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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`.
|
|
|
|
|
| |
When the target property `CUDA_PTX_COMPILATION` is enabled CUDA OBJECT
libraries will generate ptx files instead of object files.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Add a factory function to cmLocalGenerator so that variableMappings can
be provided from it, and so that Ninja can always have a hard-coded
TargetImpLib.
|
|
|
|
|
| |
Implement cmLocalGenerator::ExpandRuleVariables in terms of the new
class for source compatibility and to reduce diff noise in this commit.
|
| |
|
|
|
|
| |
Don't rely on the cmGeneratorTarget type needlessly.
|
|
|
|
|
|
|
| |
The rule replacement API should not really be in cmLocalGenerator, but
it was historically, and this coupled many other things together here
too, such as output conversion. Make the output converter a parameter
so that rule replacement can be removed from cmLocalGenerator.
|
|
|
|
| |
These do not change over the lifetime of the cmLocalGenerator.
|
|
|
|
|
|
|
|
|
| |
This one is not like the others as it doesn't participate in
substitutions. Keep ExpandRuleVariables doing only one thing and make
callers responsible for inserting a launcher prefix, simplifying the
code all-around.
Remove now-obsolete InsertRuleLauncher method.
|
|
|
|
| |
Hide some methods which no longer need to be public.
|
|
|
|
| |
Add UseWatcomQuote state, and remove corresponding method parameters.
|
|
|
|
|
|
| |
Add state for Relink and populate it at the point of cmLinkLineComputer
initialization. This allows removal of the parameter in go-between
methods.
|
|
|
|
|
|
|
| |
Remove the cmGeneratorTarget from the interface.
This is simplification of the OutputLinkLibraries responsibilities so
that it can be broken apart into multiple methods.
|
|
|
|
|
|
|
|
|
|
|
| |
CMake has several classes which have too many responsibilities.
cmLocalGenerator is one of them. Start to extract the link line
computation. Create generator-specific implementations of the interface
to account for generator-specific behavior.
Unfortunately MSVC60 has different behavior to everything else and CMake
still generates makefiles for it. Isolate it with MSVC60-specific
names.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
20e62f74 cmLocalGenerator: Simplify ConvertToLinkReference
fd93b360 cmOutputConverter: Add a flag for IsUnix
1365e18b Convert: Inline platform-specific methods
1ed5f6b3 Makefiles: Introduce local RelativePath method
8377d9e0 Fortran: Inline conversion to relative path
00173b71 Fortran: Wrap path convert in a call with a more-suitable name
d5911ef0 Makefiles: Hardcode the relative location of the CMakeCache file
c3264f48 Convert: Extract method to determine if paths are in directory
52168f32 Convert: Remove asserts which are duplicated in delegate method
5213f893 Convert: Remove early return check
b61c268b Convert: Extract local variables for readability
e278f5a8 Convert: Extract local variables
51bc6bdd cmOutputConverter: remove unused code
8e0c1599 Xcode: Inline ConvertToRelativePath calls
|
| |
| |
| |
| |
| | |
Make conversion to output format the caller responsibility, so that the
method only 'converts to a link reference'.
|