| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Fortran modules provided by objects added as linked items via
`$<TARGET_OBJECTS>` should also be considered as "linked targets" for
collation purposes. As C++ modules have their own visibility rules
through their `FILE_SET` feature, do not expose these for C++ module
collation.
|
|
|
|
|
| |
This will be used for module forwarding in order to support
`$<TARGET_OBJECTS>` usage in source and link libraries calls.
|
|
|
|
|
|
|
|
| |
Fortran modules provided by objects added as sources via
`$<TARGET_OBJECTS>` should also be considered as "linked targets" for
collation purposes. As C++ modules have their own visibility rules
through their `FILE_SET` feature, do not expose these for C++ module
collation.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since commit b6a5382217 (Ninja: depend on language module information
files directly, 2023-02-10, v3.27.0-rc1~502^2), the return value of
`cmCommonTargetGenerator::GetLinkedTargetDirectories` must account for
linked object libraries because they may provide modules (#25112).
These were added by commit b665966933 (cmComputeLinkInformation: track
OBJECT library dependencies, 2023-07-22, v3.27.1~5^2). However, targets
named by `$<TARGET_OBJECTS:...>` sources are also needed (#25365).
The latter were added by commit 22da18b995 (Fortran: Restore support for
TARGET_OBJECTS providing modules, 2023-10-27, v3.28.0-rc4~9^2) and
commit 035302b7e3 (cmComputeLinkDepends: also copy the target from
object link items, 2023-10-27, v3.28.0-rc4~9^2~2). However, their
approach added link entries not actually specified by projects. It also
incorrectly re-used `cmComputeLinkDepends::AddLinkObject` for object
library targets when it is meant for their individual object files.
These problems caused additional regressions (#25417). Revert the
implementation parts of those commits and leave behind an assertion and
comment to help avoid the mistake in the future. Instead, track targets
named by `$<TARGET_OBJECTS:...>` sources with a dedicated member.
Issue: #25112
Issue: #25365
Fixes: #25417
Co-authored-by: Ben Boeckel <ben.boeckel@kitware.com>
|
| |
| |
| |
| | |
Re-use the body in multiple loops instead of allocating to combine them.
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
80df7b1745 Linting: Fix empty evaluated genex
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8833
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update logic added by commit 099934e313 (Add generator expression
support to static code analysis hooks, 2023-03-24, v3.27.0-rc1~261^2),
and preserved by commit 993dde925f (TargetGenerator: Factor out
generation of code check rules, 2023-05-12, v3.27.0-rc1~84^2~2), to
handle a generator expression that evaluates to the empty string.
If `<LANG>_CPPCHECK`, `<LANG>_CPPLINT`, `<LANG>_CLANG_TIDY`, or
`<LANG>_INCLUDE_WHAT_YOU_USE` are empty after evaluating generator
expressions, do not run their lints.
Fixes: #25265
|
| |
| |
| |
| |
| |
| | |
This completes the transition started in commit b665966933
(cmComputeLinkInformation: track OBJECT library dependencies,
2023-07-22).
|
|/
|
|
|
|
| |
`include-what-you-use` diagnostics, in practice, are specific to
the environment's compiler and standard library. Update includes
to satisfy IWYU for our CI job under Debian 12.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In commit b6a5382217 (Ninja: depend on language module information files
directly, 2023-02-10), introduced via !8197, language-specific module
information files (`CMakeFiles/<target>.dir/<lang>Modules.json`) files
were added as real dependencies to the dyndep collation steps.
Previously, the behavior was to inform the collator of all possible
targets and search for the files manually ignoring those which did not
exist with ordering enforced by depending on the linker output of all
dependent targets. This behavior could lead to stale information being
used (e.g., if a target stops providing any targets) and also did not
reliably build everything needed on rebuilds. Afterwards, the internal
computation changed the dependency from all possible targets to an exact
set of "these targets might have modules" query, however one that did
not include `OBJECT` libraries since do not have `LinkEntry` items
internally (their objects are instead treated as source files).
As a stopgap measure, track `OBJECT` libraries in a separate list and
query them explicitly when gathering targets which may have interesting
information. Future work can add `LinkEntry` items to represent these
targets once all `LinkEntry` consumers have been audited to make sure
they are not surprised by any `OBJECT` library entries.
Fixes: #25112
|
| |
|
|
|
|
|
|
|
|
| |
De-duplicate code check rule generation in Ninja and Makefile generators
by moving their implementation to `cmCommonTargetGenerator`.
Previously Ninja was generating code check rules per language.
It was changed to generate code check rules for each source file.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
01d7860fdb Ninja,Makefile: Restore Fortran module scanning in static library cycle
846baa7c5b cmGlobalGenerator: Factor out helper to check target ordering
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8363
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since
* commit eed295fd8a (cmGlobalNinjaGenerator: require that dependency info
files work, 2023-02-01, v3.26.0-rc1~1^2~1), and
* commit 13810dee17 (cmDependsFortran: require that dependency info files
work, 2023-02-01, v3.26.0-rc1~1^2),
the Ninja and Makefile generators' module dependency scanning requires
that scanning results from from linked targets is available before
scanning the current target. In the case of a static library cycle,
we cannot expect this information from other static libraries in the
cycle. Previously we supported cyclic cases at the cost of silently
ignoring missing information.
We already compute a global order of targets that respects all
`add_dependencies`, but may break `target_link_libraries` dependencies
that occur in a static library cycle. Use this order to filter the
linked targets so we only expect scanning results to be available from
those targets that build before the current target.
This approach is sufficient to support module dependency scanning in
static library cycles as long as module dependencies do not cross
between two libraries in the same cycle.
Fixes: #24631
|
| |
| |
| |
| | |
Fixes: #24123
|
| |
| |
| |
| |
| | |
* Avoid duplicate definiitions for IsExecutableWithExports, etc...
* Add helper IsApple()
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| | |
33e27f6ca6 <LANG>_LINKER_LAUNCHER: Allow generator expressions
84ada0b0c9 <LANG>_COMPILER_LAUNCHER: Expand subset of genexes that can be evaluated
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8152
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These directories are used to direct collators for Fortran and C++
modules to consume dependent module information to properly collate.
However, the consumption of these files merely checks for existence of
the file, not whether they are actually needed anymore.
The problem arises when a target has Fortran or C++ modules at point A,
a build occurs populating this file, and then the target is updated to
no longer have potential modules. The `DependInfo.make` (for
`Makefiles`) or `<LANG>DependInfo.json` (for `Ninja`) files still exist
as they are never guaranteed to be cleaned up. This can introduce stale
information to the build which may cause a false-positive compilation if
a module file happens to still exist and gets found this way.
Instead, query the `linked-target-dirs` using the language in question
and only add the directory if it contains potential sources for modules
coming from the language in question.
|
|
|
|
|
| |
Without this, `Ninja Multi-Config` generators were not getting the right
directory to look for `<LANG>Modules.json` files for module information.
|
|
|
|
| |
Migrate from `cmCommonTargetGenerator::AddModuleDefinitionFlag`.
|
|
|
|
| |
Fixes #23463
|
|
|
|
|
|
| |
Fix spurious warnings from gfortran+Ninja for preprocessing.
Fixes: #23248
|
| |
|
|
|
|
| |
Solves: #22611
|
| |
|
|
|
|
| |
Fixes: #18316
|
| |
|
|
|
|
|
| |
CMake uses explicit 'this->' style. Using custom clang-tidy check we can
detect and fix places where 'this->' was missed.
|
| |
|
| |
|
| |
|
|
|
|
| |
Issue: #18870
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes: #20497
|
|
|
|
|
|
|
|
|
|
|
| |
The properties added by commit 4a62e3d97c (macOS: Add
OSX_COMPATIBILITY_VERSION and OSX_CURRENT_VERSION properties,
2020-01-24, v3.17.0-rc1~80^2~1) are general-purpose for all platforms
using Mach-O formats and not just on OS X. Rename them accordingly.
The properties are new to the CMake 3.17 release so we can rename
them without compatibility concerns.
Fixes: #20442
|
|
|
|
|
|
|
|
|
|
| |
Since commit 0f150b69d3 (AIX: Explicitly compute shared object exports
for both XL and GNU, 2019-07-11, v3.16.0-rc1~418^2~2) we always export
all symbols from shared libraries by default. Add a new target property
called `AIX_EXPORT_ALL_SYMBOLS` that can be explicitly set to OFF to
suppress this behavior and export no symbols by default.
Fixes: #20290
|
|
|
|
| |
Fixes: #17652
|
|
|
|
| |
Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
Add the ability to share precompiled headers artifacts between
targets.
Fixes: #19659
|
|
|
|
|
|
| |
Set the MinTypeNameLength option to an impossibly high value in order
to limit the diagnostics to iterators. Leave new expressions and cast
expressions for later.
|
|
|
|
|
| |
Update call sites to ensure the `std::string` argument can be
constructed safely.
|