Commit Graph

31003 Commits

Author SHA1 Message Date
Alexander Grund
10969fd003 cmLocalGenerator: Remove unnecessary parentheses in a condition 2021-07-07 08:04:29 -04:00
Alexander Grund
3fd56472c6 cmLocalGenerator: Store realpath lookup result in a variable 2021-07-07 08:04:15 -04:00
Alexander Grund
429fb28f25 cmLocalGenerator: Factor out repeated condition into local variable 2021-07-06 19:19:46 -04:00
Kitware Robot
28979a5968 CMake Nightly Date Stamp 2021-07-05 00:01:22 -04:00
Kitware Robot
7f6552745d CMake Nightly Date Stamp 2021-07-04 00:01:09 -04:00
Kitware Robot
51485993e7 CMake Nightly Date Stamp 2021-07-03 00:01:12 -04:00
Brad King
3736088310 Merge topic 'ctest_not_dart'
0962cbf21d help: update ctest attached file example
5489ce74b3 ctest: support <CTestMeasurement> for runtime measurements
7817aa6fa4 ctest: improve test for runtime labels

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6296
2021-07-02 09:00:56 -04:00
Brad King
c1346f67c8 Merge topic 'autogen-deps'
af11ea8d0c AutoGen: Fix needless compilation of mocs_compilation.cpp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6288
2021-07-02 08:59:40 -04:00
Kitware Robot
4f69bf0964 CMake Nightly Date Stamp 2021-07-02 00:01:10 -04:00
Zack Galbreath
5489ce74b3 ctest: support <CTestMeasurement> for runtime measurements
Teach CTest to parse output for <CTestMeasurement> in addition to
<DartMeasurement> for measurements defined at runtime.

Use a new class (cmCTestTestMeasurementXMLParser) derived from cmXMLParser
to parse the data and attributes these XML elements. This is an improvement
over our previous approach of using a series of regular expressions.

As part of this commit we also rename some member variables and methods
to make their purpose more clear.

DartStuff                        -> AllTestMeasurementsRegex
DartStuff1                       -> SingleTestMeasurementRegex
DartString                       -> TestMeasurementsOutput
GenerateDartOutput()             -> GenerateCTestXML()
GenerateRegressionImages()       -> RecordCustomTestMeasurements()
cmCTestRunTest::DartProcessing() -> ParseOutputForMeasurements()
2021-07-01 15:16:23 -04:00
Brad King
635a252564 Merge topic 'env-init-configs'
ef56eefc9b cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variable
e216b9bbd3 cmake: Allow CMAKE_BUILD_TYPE to be set by environment variable
6986a382a9 Help: Document when CMAKE_BUILD_TYPE and CMAKE_CONFIGURATION_TYPES are set
e96169a3ec Help: Cross-reference CMAKE_CONFIGURATION_TYPES from CMAKE_BUILD_TYPE
03bd9c4c10 cmMakefile: Add helper to initialize CMAKE_CONFIGURATION_TYPES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6291
2021-07-01 11:29:41 -04:00
Brad King
a10ca7f667 Merge topic 'post-rel-dev'
2c209097b9 Configure CMake itself with policies through CMake 3.20
83a3db5631 export: Increase maximum policy version in exported files to 3.20
d76cb12905 Add deprecation warnings for policies CMP0088 and below

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6290
2021-07-01 11:27:31 -04:00
Brad King
3a6cb03b6c Merge topic 'cpackdeb-md5sums-order'
a0d3494afa Tests: update MD5SUMS test to have several files
9028195a22 CPackDeb: sort package files before generating deb file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6287
2021-07-01 11:26:28 -04:00
Joerg Bornemann
af11ea8d0c AutoGen: Fix needless compilation of mocs_compilation.cpp
For an AUTOMOC'ed target foo, when depfiles are used, there are the
following dependencies:

foo_autogen -> foo_autogen/timestamp
foo_autogen/mocs_compilation.cpp -> foo_autogen/timestamp

The first is used to trigger AUTOGEN.
The second erroneously triggers a recompilation of
mocs_compilation.cpp when any source file of target foo is touched.

Remove the latter dependency and replace it with an order-only
dependency from foo_autogen/mocs_compilation.cpp to
foo_autogen_timestamp_deps.

That is achieved by making mocs_compilation.cpp or its
per-configuration variants byproduct(s) of the timestamp file.

Fixes: #22338
2021-07-01 15:31:02 +02:00
Kitware Robot
5333ee1de4 CMake Nightly Date Stamp 2021-07-01 00:01:13 -04:00
Brad King
ef56eefc9b cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variable
When no `CMAKE_CONFIGURATION_TYPES` is explicitly specified while
creating a new build tree, check for an environment variable of the same
name.

Issue: #20983
2021-06-30 10:55:40 -04:00
Brad King
e216b9bbd3 cmake: Allow CMAKE_BUILD_TYPE to be set by environment variable
When no `CMAKE_BUILD_TYPE` is explicitly specified while creating a new
build tree, check for an environment variable of the same name.

Issue: #20983
2021-06-30 10:55:40 -04:00
Brad King
03bd9c4c10 cmMakefile: Add helper to initialize CMAKE_CONFIGURATION_TYPES
Factor out duplicate code from the Ninja Multi-Config, Visual Studio,
and Xcode generators.
2021-06-30 10:55:40 -04:00
Brad King
83a3db5631 export: Increase maximum policy version in exported files to 3.20
The files generatd by `install(EXPORT)` and `export()` commands
are known to work with policies as of CMake 3.20, so enable them
in sufficiently new CMake versions.
2021-06-30 10:13:56 -04:00
Brad King
d76cb12905 Add deprecation warnings for policies CMP0088 and below
The OLD behaviors of all policies are deprecated, but only by
documentation.  Add an explicit deprecation diagnostic for policies
introduced in CMake 3.14 and below to encourage projects to port
away from setting policies to OLD.
2021-06-30 10:07:42 -04:00
Alexey Rogachevskiy
9028195a22 CPackDeb: sort package files before generating deb file
This should make the order in which the files are added to md5sums
and archives is stable, thus making package files more reproducible.

Fixes: #22361
2021-06-30 08:47:59 -04:00
Brad King
6c3ae9827f Merge topic 'ninja-edit_cache'
51bf4094fb Ninja: Use `ccmake` for `edit_cache`
7cb4ad7e39 cmGlobalCommonGenerator: Adopt GetEditCacheCommand
23af78bb78 cmGlobalCommonGenerator: Adopt GetEditCacheTargetName
1db4d74628 cmGlobalCommonGenerator: Add SupportsDirectConsole
61a737b088 cmGlobalNinjaGenerator: Rename SupportsConsolePool to SupportsDirectConsole

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6272
2021-06-30 07:33:59 -04:00
Brad King
a2f2634a5d Merge topic 'CMP0126-WARNING'
616972197a Merge branch 'backport-3.21-CMP0126-WARNING' into CMP0126-WARNING
16208ac113 CMP0126: Add control for warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6282
2021-06-30 07:32:56 -04:00
Brad King
e052bb64ef Merge topic 'vs-ARM64EC'
da0f74b5a1 VS: Add ARM64EC to supported platforms for VS 16 and 17

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6283
2021-06-30 07:30:24 -04:00
Brad King
85fe60ef03 Merge topic 'tll-out-of-dir'
e27a76f131 target_link_libraries: Restore transitive out-of-dir linking

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6285
2021-06-30 07:27:49 -04:00
Kitware Robot
82183329a5 CMake Nightly Date Stamp 2021-06-30 00:01:09 -04:00
Brad King
e27a76f131 target_link_libraries: Restore transitive out-of-dir linking
Refactoring in commit 7f506b95a7 (cmGeneratorTarget: Refactor link item
lookup, 2021-05-26, v3.21.0-rc1~103^2~4) accidentally dropped the
persistent lookup scope tracking across multiple items that was added by
commit f0e67da061 (target_link_libraries: Fix out-of-dir linking of a
list of targets, 2020-01-14, v3.17.0-rc1~149^2).  This broke a
transitive out-of-dir linking case not covered by our test suite.
Restore the scope tracking and add a test case.

Fixes: #22363
2021-06-29 16:52:12 -04:00
NAKAMURA Takumi
51bf4094fb Ninja: Use ccmake for edit_cache
If `ninja` is new enough to support the console pool, and `ccmake` is
available, use it for `edit_cache`.
2021-06-29 11:07:42 -04:00
NAKAMURA Takumi
7cb4ad7e39 cmGlobalCommonGenerator: Adopt GetEditCacheCommand
Move the implementation from the Makefile generator so it can be
later used by the Ninja generator too.
2021-06-29 11:07:14 -04:00
Brad King
da0f74b5a1 VS: Add ARM64EC to supported platforms for VS 16 and 17
In commit 4ea3a88625 (MSVC: Add support for targeting ARM64EC,
2020-12-30, v3.20.0-rc1~121^2) the `ARM64EC` platform was accidentally
added to the list for VS 15 (2017) instead of VS 16 (2019).  Its
omission from the list of platforms was then repeated for VS 17 (2022).

Issue: #21724
2021-06-29 10:59:05 -04:00
NAKAMURA Takumi
23af78bb78 cmGlobalCommonGenerator: Adopt GetEditCacheTargetName
The implementation is the same for both Makefile and Ninja generators.
2021-06-29 10:39:15 -04:00
NAKAMURA Takumi
1db4d74628 cmGlobalCommonGenerator: Add SupportsDirectConsole
Default to `true` since this is used by Makefile generators.
The Ninja generator already overrides it to use a version check.
2021-06-29 10:37:16 -04:00
NAKAMURA Takumi
61a737b088 cmGlobalNinjaGenerator: Rename SupportsConsolePool to SupportsDirectConsole
Use a name that is not ninja-specific.
2021-06-29 10:36:03 -04:00
Brad King
5bc933ce96 Merge topic 'update-kwsys'
7e9a32947b Merge branch 'upstream-KWSys' into update-kwsys
bf4ae1c2b2 KWSys 2021-06-28 (0648cb1a)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Björn Esser <besser82@fedoraproject.org>
Merge-request: !6266
2021-06-29 09:23:28 -04:00
Marc Chevrier
616972197a Merge branch 'backport-3.21-CMP0126-WARNING' into CMP0126-WARNING 2021-06-29 13:41:10 +02:00
Marc Chevrier
16208ac113 CMP0126: Add control for warnings
Fixes: #22353
2021-06-29 13:36:28 +02:00
Kitware Robot
06d2c3fce4 CMake Nightly Date Stamp 2021-06-29 00:01:13 -04:00
Brad King
7e9a32947b Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2021-06-28 (0648cb1a)
2021-06-28 13:32:23 -04:00
Brad King
c8d2e81e09 Merge topic 'target_compile_features-only-apply-to-enabled-languages'
a3cafa4237 compile_features: Ignore features that map to languages that aren't enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6255
2021-06-28 09:26:02 -04:00
Brad King
117b1545a9 Merge topic 'vs2022' into release-3.21
93c718791e VS: Use 64-bit MSBuild in VS 2022
c46b265839 VS: Add Visual Studio 17 2022 generator
b610b7a35c VS: Update v142 CL flag table for VS 17.0 Preview 1
43375c6418 Help: Remove unnecessary Sphinx versionadded markup in VS toolset selection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6268
2021-06-28 09:22:38 -04:00
Brad King
be78a9bf68 Merge topic 'vs2022'
93c718791e VS: Use 64-bit MSBuild in VS 2022
c46b265839 VS: Add Visual Studio 17 2022 generator
b610b7a35c VS: Update v142 CL flag table for VS 17.0 Preview 1
43375c6418 Help: Remove unnecessary Sphinx versionadded markup in VS toolset selection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6268
2021-06-28 09:22:38 -04:00
Brad King
0adcdd2e00 Merge topic 'ninja-lwyu-flag-order'
d7159f9591 Ninja: Fix LINK_WHAT_YOU_USE link flag placement

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6263
2021-06-28 09:20:10 -04:00
Kitware Robot
25d7cd9671 CMake Nightly Date Stamp 2021-06-28 00:01:16 -04:00
Kitware Robot
66a0f46f9f CMake Nightly Date Stamp 2021-06-27 00:01:07 -04:00
Kitware Robot
cd809b8ea4 CMake Nightly Date Stamp 2021-06-26 00:01:09 -04:00
Robert Maynard
a3cafa4237 compile_features: Ignore features that map to languages that aren't enabled
Remove the Cuda/ConsumeCompileFeatures test as it only existed to
validate that using `cxx_std_XY` would cause the paired language (CUDA) to also build in mode XY.
2021-06-25 13:39:50 -04:00
Brad King
93c718791e VS: Use 64-bit MSBuild in VS 2022
Visual Studio 17 2022 is now a 64-bit native application.  It places the
64-bit `MSBuild.exe` in the `PATH` of VS command prompts, so prefer it
for this version and above.

This was previously attempted for older VS versions, but reverted by
commit f3cedf381e (VS: Revert "Use MSBuild matching toolset host
architecture", 2019-03-12, v3.14.0~1^2).  For now, do not use the 64-bit
MSBuild for VS 16 and below.

Fixes: #18219
2021-06-25 12:45:53 -04:00
Brad King
c46b265839 VS: Add Visual Studio 17 2022 generator
Fixes: #22339
2021-06-25 12:45:44 -04:00
Đoàn Trần Công Danh
d7159f9591 Ninja: Fix LINK_WHAT_YOU_USE link flag placement
Move `-Wl,--no-as-needed` from the `<FLAGS>` placeholder to
`<LINK_FLAGS>`, as it is in the Makefile generators.

Fixes: #22342
2021-06-25 08:45:47 -04:00
Brad King
a6b075c3f8 Merge topic 'import-elf'
115ff6a347 cmELF: Include the ELF parsing code unconditionally
5dfa3ddbe5 cmELF: Allow building without system ELF headers
0da1540aaa cmELF: Fix check for TagMipsRldMapRel
e21188df8b cmELF: Open file explicitly in binary mode
70cdb36d25 Merge branch 'upstream-elf' into import-elf
7a0a37ca41 elf 2021-06-23 (f13da247)
18038042ed cmelf: Add script to import the FreeBSD ELF headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6240
2021-06-25 07:26:35 -04:00