Commit Graph

26181 Commits

Author SHA1 Message Date
Sebastian Holtermann
ec3c968de2 cmake: Use scopes to limit temporary object lifetime 2019-03-18 15:09:11 +01:00
Sebastian Holtermann
1de0c827a1 cmDependsC: Read cache file modification time only once
Using cmFileTime to store and compare file times in cmDependsC allows us to
read the cache file modification time only once instead of over and over again
for each comparison.
2019-03-18 15:09:11 +01:00
Sebastian Holtermann
5536cec46e Rename cmFileTimeCache::FileTimeCompare to cmFileTimeCache::Compare 2019-03-18 15:09:11 +01:00
Sebastian Holtermann
98d4846953 Rename cmFileTimeCache::FileTimesDiffer to cmFileTimeCache::DifferS 2019-03-18 15:09:11 +01:00
Sebastian Holtermann
a6d75a1ce0 Substitute FileComparison in variable names with FileTimeCache 2019-03-18 15:09:11 +01:00
Sebastian Holtermann
216416219a Rename cmFileTimeComparison to cmFileTimeCache
The name `cmFileTimeCache` reflects the functionality of the class more
appropriately.
2019-03-18 15:09:11 +01:00
Sebastian Holtermann
3160258393 cmFileTimeComparison: Replace anonymous private class with std::map
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.
2019-03-18 15:09:10 +01:00
Sebastian Holtermann
103aa9e46a cmFileTimeComparison: Use cmFileTime internally
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.
2019-03-18 15:09:10 +01:00
Sebastian Holtermann
6f24c4e93f New cmFileTime class
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.
2019-03-18 15:09:10 +01:00
Kitware Robot
b06f8c93e5 CMake Nightly Date Stamp 2019-03-18 00:01:06 -04:00
Kitware Robot
283330976f CMake Nightly Date Stamp 2019-03-17 00:01:07 -04:00
Kitware Robot
49f606f3bb CMake Nightly Date Stamp 2019-03-16 00:01:09 -04:00
Brad King
3261f23870 Merge topic 'export-package-default-off'
9bede5c4ce export: Disable PACKAGE mode user package registry by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Lukas Mosimann <lumosimann@gmail.com>
Merge-request: !3041
2019-03-15 10:45:51 -04:00
Brad King
a6d8165dd2 Merge topic 'ninja-dyndep-touchups'
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
2019-03-15 10:27:55 -04:00
Robert Maynard
9bede5c4ce export: Disable PACKAGE mode user package registry by default
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.
2019-03-15 10:24:47 -04:00
Brad King
0db702c702 Merge topic 'find_program-windows-share'
00c4ddf75e find_program: Restore leading double slash on Windows network path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3105
2019-03-15 10:21:35 -04:00
Brad King
7d77607d10 Merge topic 'vs2019-wow64'
5c50eeaffc VS: Fix x64 host recognition by x86 cmake process

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3102
2019-03-15 10:19:01 -04:00
Brad King
164261910d Merge topic 'cmake-gui-unused-code'
dd8c2f3e57 cmake-gui: Drop code not needed with current required CMake version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3099
2019-03-15 10:14:52 -04:00
Kitware Robot
2efecea485 CMake Nightly Date Stamp 2019-03-15 00:01:07 -04:00
Brad King
00c4ddf75e find_program: Restore leading double slash on Windows network path
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
2019-03-14 14:46:23 -04:00
Brad King
5c50eeaffc VS: Fix x64 host recognition by x86 cmake process
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`.
2019-03-14 13:19:18 -04:00
Brad King
dd8c2f3e57 cmake-gui: Drop code not needed with current required CMake version 2019-03-14 11:15:34 -04:00
Brad King
32a569e877 Merge topic 'refactor_cmfilecopier'
e2e8f6b132 cmFileCommand: Factor out cmFileCopier and cmFileInstaller

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2664
2019-03-14 11:13:33 -04:00
Brad King
7bc03aa6e2 Merge topic 'string_scopes'
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
2019-03-14 11:12:44 -04:00
Brad King
101621ee52 Merge topic 'xcodescheme'
40be48f890 XCode: Add scheme option XCODE_SCHEME_DEBUG_AS_ROOT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3084
2019-03-14 11:07:53 -04:00
Brad King
accbf41da5 Merge topic 'short-commands'
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
2019-03-14 11:06:19 -04:00
Brad King
bf02d62532 CMake 3.14.0 2019-03-14 09:08:05 -04:00
Kitware Robot
e1af2489fd CMake Nightly Date Stamp 2019-03-14 00:01:08 -04:00
Bryon Bean
e2e8f6b132 cmFileCommand: Factor out cmFileCopier and cmFileInstaller
Split these classes out into their own sources.
2019-03-13 14:06:32 -04:00
Sebastian Holtermann
3039fd7a29 cmDependsC: Use faster cmSystemTools::FileTimeCompare
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.
2019-03-13 18:01:03 +01:00
Brad King
80b761b924 Merge topic 'update-documentation'
da2e588935 cmake: Upgrade 'cmake -E' commands description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3089
2019-03-13 10:19:21 -04:00
Brad King
7b81b1c72c Merge topic 'cuda_compiler_generator_expressions'
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
2019-03-13 10:16:25 -04:00
Brad King
1b8c5a0c35 Merge topic 'revert-vs-msbuild-arch'
f3cedf381e VS: Revert "Use MSBuild matching toolset host architecture"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3090
2019-03-13 10:08:57 -04:00
Kitware Robot
f74bb6527e CMake Nightly Date Stamp 2019-03-13 00:01:07 -04:00
Ben Boeckel
76e6e01c6c cmNinjaTargetGenerator: use a different depfile for preprocessing
If the compile rule also needs a depfile, the names now no longer
collide.
2019-03-12 15:37:07 -04:00
Ben Boeckel
414332ff57 cmake_ninja_dyndep: don't duplicate slashes 2019-03-12 15:37:07 -04:00
Brad King
f3cedf381e VS: Revert "Use MSBuild matching toolset host architecture"
Revert commit da402a081b (VS: Use MSBuild matching toolset host
architecture, 2019-01-28, v3.14.0-rc1~50^2).  Multiple people have
reported that the 64-bit `amd64/msbuild` tool fails in cases that the
32-bit `msbuild` works.  Drop our change pending further investigation
and hopefully a fix to VS.

Fixes: #18904, #19037
Issue: #18219
2019-03-12 12:53:06 -04:00
Bartosz Kosiorek
da2e588935 cmake: Upgrade 'cmake -E' commands description
Fixes: #13204
2019-03-12 16:01:33 +01:00
Brad King
5822a7bed2 Merge topic 'shell_path'
463c2fba4e Genex: Teach SHELL_PATH to support a list of paths
21da25d2a8 Tests: Generalize GeneratorExpression MSYS path conversion workaround

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3057
2019-03-12 09:53:27 -04:00
Bartosz Kosiorek
077ab5774c cmake: add short version of '--target <tgt>...' option 2019-03-12 12:00:09 +01:00
Bartosz Kosiorek
071f5e1544 cmake: Reformat '--parallel' and '--verbose' options in help 2019-03-12 11:59:16 +01:00
Sebastian Holtermann
b96c3c74dd cmDependsC: Use auto for long type names 2019-03-12 11:44:44 +01:00
Sebastian Holtermann
e81b425019 cmDependsC: Remove useless string preallocation artifact 2019-03-12 11:41:56 +01:00
Sebastian Holtermann
d1a54ee26a cmDepends: Reduce temporary object lifetime with local scopes 2019-03-12 11:29:27 +01:00
Sebastian Holtermann
ae416a6b5c cmLocalUnixMakefileGenerator3: Use std::unique_ptr instead of new/delete 2019-03-12 11:02:22 +01:00
Sebastian Holtermann
60a407b01c cmLocalUnixMakefileGenerator3: Pass strings instead of recomputing them 2019-03-12 11:02:09 +01:00
Sebastian Holtermann
addd1ce402 cmLocalUnixMakefileGenerator3: Move local strings into local brace scopes 2019-03-12 11:01:48 +01:00
Kitware Robot
7358f317e3 CMake Nightly Date Stamp 2019-03-12 00:01:07 -04:00
Robert Maynard
b53766b205 CUDA: Support compiler id and version generator expressions
Introduce the CUDA_COMPILER_ID and CUDA_COMPILER_VERSION generator
expressions.
2019-03-11 12:33:43 -04:00
Robert Maynard
b544e34af6 All VersionNode use the same capitalization pattern 2019-03-11 11:48:37 -04:00