Custom command dependencies are followed for each target's source files
and add their transitive closure to the corresponding target. This
means that when a custom command in one target has a dependency on a
custom command in another target, both will appear in the dependent
target's sources. For the Makefile, VS IDE, and Xcode generators this
is not a problem because each target gets its own independent build
system that is evaluated in target dependency order. By the time the
dependent target is built the custom command that belongs to one of its
dependencies will already have been brought up to date.
For the Ninja generator we need to generate a monolithic build system
covering all targets so we can have only one copy of a custom command.
This means that we need to reconcile the target-level ordering
dependencies from its appearance in multiple targets to include only the
least-dependent common set. This is done by computing the set
intersection of the dependencies of all the targets containing a custom
command. However, we previously included only the direct dependencies
so any target-level dependency not directly added to all targets into
which a custom command propagates was discarded.
Fix this by computing the transitive closure of dependencies for each
target and then intersecting those sets. That will get the common set
of dependencies. Also add a test to cover a case in which the
incorrectly dropped target ordering dependencies would fail.
Although we provide a `VS_GLOBAL_ROOTNAMESPACE` option to both set
the `RootNamespace` value and reference it, some users may try to
set `VS_GLOBAL_RootNamespace` to set `RootNamespace` as a variant
of the `VS_GLOBAL_<variable>` property. In this case we still
need to add the reference to `$(RootNamespace)`.
Since commit v3.6.0-rc1~339^2 (CPack: Fix CPACK_INSTALL_CMAKE_PROJECTS
SubDirectory (4th) option, 2016-02-18) we now honor the "Directory"
option of this variable. Prior to that commit the value was not used
so projects may have used a placeholder value like `.` instead of `/`.
Treat `.` the same as `/` to restore compatibility with such projects.
Fixes#16205.
Add an explicit `<Natvis>` element in VS project files for `*.natvis`
files. These enable custom debug visualizers for project-specific
types.
Fixes#16043.
Use `sysconf(_SC_ARG_MAX)` wherever `_SC_ARG_MAX` is available instead
of hard-coding an incomplete list of operating systems that implement
it. In particular, it is available on BSD platforms that were not
previously listed.
Commit v3.6.0-rc1~174^2~1 (cmGlobalNinjaGenerator: Clarify logic for
forcing use of response files, 2016-04-06) started using negative
command line length values to represent forced use of response files but
forgot to update `calculateCommandLineLengthLimit()` accordingly. Teach
it to return `0` instead of `-1` when no limit is computed from the
system to avoid forcing response files.
Reported-by: Raphael Kubo da Costa <rakuco@FreeBSD.org>
4db08807 CMake: Report whether generators support platforms
43a68a6d cmGlobalGeneratorFactory: Use CM_OVERRIDE for all derived classes
af0e1cd4 Make CMake version dirty state available to code
6a077b5d Make CMake version suffix available to code
2aadb02f QtIFW: Don't show component selection page if it don't need
53992808 QtIFW: process USE_LGPL when CMake_INSTALL_COMPONENTS
8ae035a5 CMake: install COMPONENT cmcldeps
This code has accidentally not been compiled since commit
v3.0.0-rc1~556^2 (cmake: Split -E command implementation into separate
source file, 2013-10-03) because CMAKE_HAVE_VS_GENERATORS was local to
`cmake.cxx`.
Fixes#16195.
This code has not been compiled since commit v3.0.0-rc1~556^2 (cmake:
Split -E command implementation into separate source file, 2013-10-03).
It appears the code was never used since it was added anyway.
Files generated by `install(EXPORT)` and `export_library_dependencies()`
may be installed with packages and consumed by dependents. In order to
avoid re-building dependents only because the version of CMake changed,
drop the CMake version from the export file content.
The fix in commit commit v3.6.0-rc1~82^2 (Drop find_(library|file|path)
prefixes from PATH on non-Windows, 2016-05-09) aggressively dropped
search of the entries in PATH itself in addition to the prefixes derived
from it. This regresses find modules that (incorrectly) depended on the
behavior, including some of our own modules such as FindImageMagick.
Restore the search of entries in PATH itself. If we want to drop it
later we will need to do so with a policy. Fixes#16192.