a8b7cbb787 Autogen: Do not treat hard-coded -I/usr/include exclusion as implicit include
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3159
15be06a5ec Tests: Fix Plugin test for international characters on Windows
24da7da686 Merge branch 'upstream-KWSys' into update-kwsys
8166634958 KWSys 2019-03-28 (e92bdbe8)
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3158
The `cmLocalGenerator::GetIncludeDirectoriesImplicit` method is called
by `cmQtAutoGenInitializer` to get the compiler's list of implicit
include directories. Since commit 557b2d6e65 (Fix regression in
-I/usr/include exclusion logic, 2019-02-13, v3.14.0-rc2~6^2~2) the
method hard-codes exclusion of `/usr/include` for historical reasons.
However, it should not be reported as a real implicit include directory
unless the compiler really has it.
Refactor the logic to distinguish the hard-coded exclusion of
`/usr/include` from the real list of implicit include directories.
Fixes: #19100
When the current source file is not found the FilePath variable was left
with the previous path content. In case the previous file had less lines
than the current one and there are 'line' entries for the current one
with higher number we ended up in a buffer overflow while indexing the
previous file entry with a line number higher. By clearing the
FilePath, the empty() guard triggers correctly on an empty path and it
avoid modifying the wrong data.
b289243d99 cmGlobalGenerator: Inline `aRange` acquisition in `for(x:aRange)` invocations
bf9afa1e15 cmGlobalGenerator: Use auto for long iterator types
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Merge-request: !3144
Any `include_directories()` calls in toolchain files are used during our
ABI detection step even though it does not include any system headers.
Since commit 5990ecb741 (Compute implicit include directories from
compiler output, 2018-12-07, v3.14.0-rc1~108^2), that check is also used
to detect implicit include directories. Any `include_directories()` in
a toolchain file are detected as implicit and later excluded from
explicit specification on compiler command lines, thus breaking the
purpose of the calls in the first place.
Fix the implicit include directory detection step to avoid using paths
from `include_directories()` calls in the toolchain file.
Fixes: #19079
Changes the following code snippets in `cmGlobalGenerator`
```
AType aRange = object.getRange();
for ( auto & item: aRange) {
```
to
```
for ( auto & item: object.getRange()) {
```
If by some chance the moc executable does not exist while running
AUTOMOC, instead of showing an error, the CMake Autogen invocation
hangs indefinitely.
This happens because UVProcessFinished() is not called if the process
does not launch correctly.
Make sure to call UVProcessFinished() even if the process launch fails,
and also report the error returned by libuv.
To manage the lifetime of `cmTargetInternals`, the private implementation of
`cmTarget`, use `std::unique_ptr<cmTargetInternals>` instead of
`cmTargetInternalPointer`, which is removed.
`cmTarget` is made non-copyable but movable.