After the switch to `cmFileTime`, the anonymous private class of
`cmFileTimeComparison` held only a `std::map`. This moves the
`std::map` to the `cmFileTimeComparison` class itself and removes the
instantiation of an anonymous private class.
This replaces OS dependent code in `cmFileTimeComparison` with `cmFileTime`
instances that provide the required file time load and comparison operations.
A new public `cmFileTimeComparison::Load` method is introduced that,
for a given file name, updates the `cmFileTimeComparison` cache on demand and
returns a `cmFileTime` instance on success.
The new cmFileTime class stores the file modification time as an OS independent
nanosecond count. Its main use is to load and compare file modification times
in nanosecond and second resolution.
76e6e01c6c cmNinjaTargetGenerator: use a different depfile for preprocessing
414332ff57 cmake_ninja_dyndep: don't duplicate slashes
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3093
The user package registry populated by the `export()` command causes
side effects outside the build and source directories. Such effects
should be opt-in rather than op-out. Introduce a policy to change
default behavior of `export(PACKAGE)` to do nothing.
Since commit c76c1ea208 (find_program: Consider CWD only for paths with
separator, 2018-05-31, v3.13.0-rc1~413^2) we accidentally convert the
leading `//` to just `/` on results with Windows network paths.
This was caused by `CollapseCombinedPath` being less robust than
`CollapseFullPath`. Restore use of the latter but in a way that
preserves the requirement of the above commit to support candidates that
are themselves absolute.
Fixes: #19049
Issue: #19050
In commit 57e48f16f2 (VS: Add Visual Studio 16 2019 generator,
2019-01-09, v3.14.0-rc1~150^2) and commit 0fd742a6ff (VS: Teach VS 2019
generator to select host tools matching host arch, 2019-01-28,
v3.14.0-rc1~63^2) we intended to select the `x64` target architecture
and `x64` host tools by default on x64 host machines. Fix detection
of a x64 host when CMake itself is a 32-bit x86 process.
The KWSys SystemInformation `Is64Bits` member is not set correctly,
which led to this bug. Pending investigation on the KWSys side,
simply test ourselves via `IsWow64Process`.
Do not `find_package(GTK2)` by default, as it gives the impression that
CMake depends on it to build. We will set `CMake_TEST_FindGTK2` in the
cache of automated builds where GTK2 is expected to work.
3039fd7a29 cmDependsC: Use faster cmSystemTools::FileTimeCompare
b96c3c74dd cmDependsC: Use auto for long type names
e81b425019 cmDependsC: Remove useless string preallocation artifact
d1a54ee26a cmDepends: Reduce temporary object lifetime with local scopes
ae416a6b5c cmLocalUnixMakefileGenerator3: Use std::unique_ptr instead of new/delete
60a407b01c cmLocalUnixMakefileGenerator3: Pass strings instead of recomputing them
addd1ce402 cmLocalUnixMakefileGenerator3: Move local strings into local brace scopes
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !3088
077ab5774c cmake: add short version of '--target <tgt>...' option
071f5e1544 cmake: Reformat '--parallel' and '--verbose' options in help
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3078
The file stat caching feature of the local cmFileTimeComparison instance is
unused in the addressed context. To avoid the allocation and initialization
overhead of cmFileTimeComparison use cmSystemTools::FileTimeCompare instead.
Although the upstream has a CMake build system, it is meant for the
complete package. Add a simple one to build just the static library
we need within CMake.
b53766b205 CUDA: Support compiler id and version generator expressions
b544e34af6 All VersionNode use the same capitalization pattern
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3085