The `DisableCleandead` member was added by commit c5011399c5 (Ninja:
Avoid cleandead with dyndep bindings for Fortran module dependencies,
2020-11-10, v3.19.0~15^2) but has not been used since commit 1144d25094
(Merge branch 'backport-ninja-no-cleandead' into ninja-no-cleandead,
2020-12-14, v3.19.2~4^2). Remove it.
Rewrite AppendTargetDependsClosure method to only cache local target
outputs, not including outputs from dependencies.
Caching all recursive target outputs causes much time to be spent
merging sets that have many elements in common (from targets that are
included through multiple dependency paths).
It is faster to always iterate over all dependencies instead.
Before, a documentation entry was in/out parameter.
Now it's a normal return value.
This also makes possible to eliminate defaulted default ctor
for `cmDocumentationEntry` for C++ 11.
Also, simplify `cmake::AppendGlobalGeneratorsDocumentation()`.
Also write for all configurations from multi-config generators.
This field was added in the Clang 5 documentation and not present in the
Clang 4 documentation (sometime between Dec 2016 and Mar 2017 according
to `web.archive.org`).
a12050666c Tests: Add case for ninja with non-ascii chars
02a04dd9c7 Ninja: Restore support for non-ascii paths on Windows with ninja<=1.10
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7833
Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to
's_ErrorOccurred' and 's_FatalErrorOccurred', respectively.
Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and
'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
Not all filesystems support `:` in the name, so replace it with `-`. As
`-` is not otherwise allowed in module names anyways, there is no risk
of conflict.
a136b6ec98 MINGW: Define variable only when targeting Windows platforms
39c5dad0cb Ninja: Remove redundant check for GNU-like compiler on Windows
0b7ae84a96 Cygwin: Remove redundant definitions of CYGWIN and UNIX variables
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6538
Update the Ninja generator's check to work using whatever language is
being enabled instead of hard-coding C and CXX. With that, the
undocumented internal `CMAKE_COMPILER_IS_MINGW` variable is only set by
compilers already covered by other alternatives in the condition. See
commit b3de0dfe93 (Ninja: Use forward slashes for any GCC on Windows,
2015-05-07, v3.3.0-rc1~93^2~3).
When scanning Fortran dependencies, we know the file path at which a
provided module file is written. Store it in the `compiled-module-path`
field as specified by P1689R4. Our collator in `cmake_ninja_dyndep` no
longer needs to assume that the module file path can be derived from the
logical module name. In the future, the Fortran dependency scanning may
be done by the compiler itself, in which case it will provide the value
of `compiled-module-path`.
Read and write the `compiled-module-path` field only when explicitly
known. Move the assumption that the `compiled-module-path` can be
derived from the logical module name from the scandep parser to the
`cmake_ninja_dyndep` helper.
The Ninja generator traditionally referenced source files and include
directories using paths relative to the build directory if they could be
expressed without a `../` sequence that leaves the build and source
directories. For example, when using a `build/` directory inside the
source tree, sources would be compiled as `-c ../src.c` and include
directories would be referenced as `-I ../include`. This approach
matches the traditional Ninja convention of using relative paths
whenever possible, but has undesirable side effects such as:
* Compiler diagnostic messages may not use absolute paths, making it
harder for IDEs/editors to find the referenced sources or headers.
* Debug symbols may not use absolute paths, making it harder for
debuggers to find the referenced sources or headers.
* Different results depending on the path to the build tree relative
to the source tree.
* Inconsistent with the Makefile generators, which use absolute paths.
Switch to always using absolute paths to reference source files and
include directories on compiler command lines. While alternative
solutions for diagnostic messages and debug symbols may exist with
specific tooling, this is the simplest and most consistent approach.
Note that a previous attempt to do this in commit 955c2a630a (Ninja: Use
full path for all source files, 2016-08-05, v3.7.0-rc1~275^2) was
reverted by commit 666ad1df2d (Revert "Ninja: Use full path for all
source files", 2017-02-24, v3.8.0-rc2~9^2) due to problems hooking up
depfile dependencies on generated files. This time, the changes in
commit 2725ecff38 (Ninja: Handle depfiles with absolute paths to
generated files, 2021-05-19) should avoid those problems.
Fixes: #13894, #17450