Commit Graph

64631 Commits

Author SHA1 Message Date
Brad King 0102b25cf8 Merge topic 'cxxmodules-export-file-collisions'
4cd153afe3 Merge branch 'backport-cxxmodules-export-file-collisions'
d791f3a180 cxxmodules: make export trampoline script files unique
2352dcc830 Source: Simplify hasher object construction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9166
2024-01-19 10:54:20 -05:00
Kitware Robot d07aee97fe CMake Nightly Date Stamp 2024-01-19 00:01:11 -05:00
Brad King 4cd153afe3 Merge branch 'backport-cxxmodules-export-file-collisions' 2024-01-18 17:45:07 -05:00
Ben Boeckel d791f3a180 cxxmodules: make export trampoline script files unique
Include the name of the `EXPORT` in the filename when generating export
information for C++ modules. This allows the same directory to be used
for multiple sets of C++ module-using targets.

For `export(TARGETS)` uses, generate a name based on the hash of the
concatenation of the target names involved with the `export()` call.

Fixes: #25609
2024-01-18 17:40:44 -05:00
Brad King 2352dcc830 Source: Simplify hasher object construction 2024-01-18 17:40:32 -05:00
Brad King c75047709f Merge topic 'autogen-exe-per-config'
596e84b0d5 NinjaMultiConfig: Update tests for the new dependency change
7c39dabdbc Autogen: AUTO*_EXECUTABLE: add support for per-config values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8919
2024-01-18 09:01:17 -05:00
Brad King d3adede1cd Merge topic 'fix_CTestUpdateGIT'
9ab1241035 Tests: Improve CTest.UpdateGIT robustness to user gitconfig

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9160
2024-01-18 08:57:07 -05:00
Brad King 2bb5ad396b Merge topic 'FindPackageMessage-strip-spaces'
4ecfd1a7dc FindPackageMessage: Remove extra whitespace from messages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9156
2024-01-18 08:56:22 -05:00
Brad King 2debd9dd4e Merge topic 'isspace'
d9d9326e14 Source: Avoid out-of-range inputs to std::isspace()
14abdc8e2b cmXMLParser: Remove unused IsSpace method

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9162
2024-01-18 08:54:25 -05:00
Brad King f3032be9fc Merge branch 'release-3.28' 2024-01-18 08:53:12 -05:00
Brad King c065af700a Merge topic 'FindMatlab-fix-exact-version'
7060e2135c FindMatlab: Restore support for finding EXACT major.minor version
88a1392270 FindMatlab: use correct registry view when extracting versions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9163
2024-01-18 08:53:12 -05:00
Brad King c0734d5507 Merge topic 'FindMatlab-fix-exact-version' into release-3.28
7060e2135c FindMatlab: Restore support for finding EXACT major.minor version
88a1392270 FindMatlab: use correct registry view when extracting versions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9163
2024-01-18 08:53:10 -05:00
Kitware Robot bef9f0920f CMake Nightly Date Stamp 2024-01-18 00:01:10 -05:00
Hermann von Kleist 7060e2135c FindMatlab: Restore support for finding EXACT major.minor version
By comparing major.minor, the behavior approximately matches pre-3.28
behavior.

Fixes: #25605
2024-01-17 10:33:48 -05:00
Hermann von Kleist 88a1392270 FindMatlab: use correct registry view when extracting versions 2024-01-17 16:19:22 +01:00
Brad King d9d9326e14 Source: Avoid out-of-range inputs to std::isspace()
`isspace` takes `int` but documents that the value must be representable
by `unsigned char`, or be EOF.  Use a wrapper to cast to `unsigned char`
to avoid sign extension while converting to `int`.  This generalizes the
fix from commit 5e8c176e2a (cmExecuteProcessCommand: Cast c to unsigned
char before cast to int, 2024-01-05) to other `isspace` call sites.

This was detected by assertions in the MSVC standard library while
processing UTF-8 text.

Issue: #25561
2024-01-17 10:17:06 -05:00
Brad King 14abdc8e2b cmXMLParser: Remove unused IsSpace method 2024-01-17 10:15:44 -05:00
Ashish Sadanandan 9ab1241035 Tests: Improve CTest.UpdateGIT robustness to user gitconfig
Previously the test failed when the user's gitconfig has
`push.default=nothing` set.
2024-01-17 10:11:41 -05:00
Orkun Tokdemir 596e84b0d5 NinjaMultiConfig: Update tests for the new dependency change
* Tests were updated for the cases both `AUTOGEN_BETTER_GRAPH_MULTI_CONFIG` is ON and OFF

This commit reimplements e454314daa
2024-01-17 16:02:58 +01:00
Orkun Tokdemir 7c39dabdbc Autogen: AUTO*_EXECUTABLE: add support for per-config values
* Per-config values were added to `AUTO*_EXECUTABLE`.
* Dependency order was refactored for `cmake_autogen` and `cmake_autorcc` to avoid unnecessary rebuilds.
* A new parameter was added for `cmake_autogen` and `cmake_autorcc` to specify the config name of the `auto*_executable` to be used.
* Add `AUTOGEN_BETTER_GRAPH_MULTI_CONFIG` target property to change the behavior of the dependency graph.
* The timestamp target is split into three targets for per-config to avoid redundant `mocs_compilation` builds when `AUTOGEN_BETTER_GRAPH_MULTI_CONFIG`	 is ON
* Per-config `DEP_FILE_RULE_NAME` values were added to `AutogenInfo.json` for `Multi-Config` usage.
* Some functions were refactored to avoid code duplication.

This commit reimplements fddd0f0443

Fixes: #20074
2024-01-17 16:02:58 +01:00
Brad King fa4a499238 Merge topic 'cmake-language-exit-code'
1bb1769235 cmake_language: Add EXIT subcommand
4f160f7906 cmakemain: Return the SCRIPT_MODE exit code if it was set
b62dcbf5d2 cmMakefile: check cmake script mode exit code after command
3d9d504646 cmMakefile: Store the exit code from cmExecutionStatus to cmake instance
9f6c937408 Source/cmake.h: Add ScriptModeExitCode for proper storing exit code
1082b9cb9a cmExecutionStatus: Add ability to set optional custom exit code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Leonid Pospelov <pospelovlm@yandex.ru>
Acked-by: NoMaY (a user of Renesas Rulz Japanese Forum) <nomay-jp@outlook.com>
Merge-request: !8228
2024-01-17 09:53:46 -05:00
Brad King c7ebec770f Merge topic 'lcc-updates-2024-01'
202f4b3161 Tests: Exclude some tests on broken libc on Elbrus
9dd0ab9c88 LCC: Make CMake build without warnings on LCC 1.21
1dbb31cea2 libarchive: avoid lchmod not implemented warning on old LCC
83af26d9ad LCC: Don't enable debugger on LCC that don't have <future>
fa764ce311 liblzma: Make cmliblzma buildable on LCC 1.21
77e046b47c jsoncpp: fix missing template deletion support on LCC < 1.23
67de0c197b cmcurl: fix X509_STORE_up_ref issue not just on LCC 1.23, but on LCC <= 1.23
9bc2aba3b4 LCC: get rid of ambiguous assignments of {} for LCC
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9157
2024-01-17 09:51:13 -05:00
Brad King 094648fa73 Merge topic 'FindX11-Xdbe'
b118132c5f FindX11: Add awareness of Xdbe

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9153
2024-01-17 09:48:58 -05:00
Brad King e6c7a0c2b7 Merge branch 'release-3.28' 2024-01-17 09:36:45 -05:00
Brad King 5394d79b35 Merge topic 'cxxmodules-obj-lib'
c09f8d27cd cxxmodules: compute link information for C++ module-consuming targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9154
2024-01-17 09:36:45 -05:00
Brad King 1e32d3118c Merge topic 'cxxmodules-obj-lib' into release-3.28
c09f8d27cd cxxmodules: compute link information for C++ module-consuming targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9154
2024-01-17 09:36:43 -05:00
Brad King 6bd77281ea Merge branch 'release-3.28' 2024-01-17 09:34:59 -05:00
Brad King 10131f2c53 Merge topic 'matlab-win'
42fbe01eba FindMatlab: Accept long version in matlab_get_release_name_from_version
c608adc236 FindMatlab: Fix major.minor version lookups in Windows Registry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9148
2024-01-17 09:34:59 -05:00
Brad King 3c868a3fb4 Merge topic 'matlab-win' into release-3.28
42fbe01eba FindMatlab: Accept long version in matlab_get_release_name_from_version
c608adc236 FindMatlab: Fix major.minor version lookups in Windows Registry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9148
2024-01-17 09:34:58 -05:00
Kitware Robot 69b562c8ad CMake Nightly Date Stamp 2024-01-17 00:01:09 -05:00
makise-homura 202f4b3161 Tests: Exclude some tests on broken libc on Elbrus
These tests found to be occasionally failing, so just in case CMake
is used in such environment, don't test this at all.
2024-01-16 22:12:07 +03:00
makise-homura 9dd0ab9c88 LCC: Make CMake build without warnings on LCC 1.21 2024-01-16 22:12:07 +03:00
makise-homura 1dbb31cea2 libarchive: avoid lchmod not implemented warning on old LCC 2024-01-16 22:12:06 +03:00
makise-homura 83af26d9ad LCC: Don't enable debugger on LCC that don't have <future> 2024-01-16 22:12:06 +03:00
makise-homura fa764ce311 liblzma: Make cmliblzma buildable on LCC 1.21 2024-01-16 22:12:02 +03:00
makise-homura 77e046b47c jsoncpp: fix missing template deletion support on LCC < 1.23 2024-01-16 22:11:09 +03:00
makise-homura 67de0c197b cmcurl: fix X509_STORE_up_ref issue not just on LCC 1.23, but on LCC <= 1.23 2024-01-16 22:11:08 +03:00
makise-homura 9bc2aba3b4 LCC: get rid of ambiguous assignments of {} for LCC
LCC 1.21 can't determine the exact type of right side
of assignment and so produces an error. Here it is resolved
by an intermediate variable.
2024-01-16 22:11:02 +03:00
Brad King 7010eb5fea Merge topic 'doc-CMP0156'
64b682d3ba Help: Fix typo in CMP0156 documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !9159
2024-01-16 13:22:57 -05:00
Máté Ferenc Nagy-Egri 4ecfd1a7dc FindPackageMessage: Remove extra whitespace from messages
In particular, the call to `find_package_message` from FPHSA may
have extra whitespace in some cases.
2024-01-16 12:05:15 -05:00
Kristian Spangsege b118132c5f FindX11: Add awareness of Xdbe
Fixes: #25591
2024-01-16 11:57:53 -05:00
Brad King 64b682d3ba Help: Fix typo in CMP0156 documentation 2024-01-16 11:49:00 -05:00
Brad King eee631bb8a Merge topic 'ewilde/swift-escapism'
9950a69f26 Swift/Ninja: Fix compile commands output file path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9150
2024-01-16 11:44:58 -05:00
scivision 42fbe01eba FindMatlab: Accept long version in matlab_get_release_name_from_version
Make this work:

  matlab_get_release_name_from_version(${Matlab_VERSION})

which the user would expect.

While at it, simplify this function code.
2024-01-16 11:37:43 -05:00
scivision c608adc236 FindMatlab: Fix major.minor version lookups in Windows Registry
The registry key names use only the first two version components.
Previously we were using the full versions.

Fixes: #25582
2024-01-16 11:35:32 -05:00
Brad King 267c480b24 Merge branch 'release-3.28' 2024-01-16 11:10:30 -05:00
Brad King 320d6f446d Merge topic 'FindMatlab-fix-version-without-versioninfoxml'
694727bb45 FindMatlab: Restore support for versions without VersionInfo.xml

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9151
2024-01-16 11:10:29 -05:00
Brad King cce2120428 Merge topic 'FindMatlab-fix-version-without-versioninfoxml' into release-3.28
694727bb45 FindMatlab: Restore support for versions without VersionInfo.xml

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9151
2024-01-16 11:10:28 -05:00
Brad King fc2590e9e7 Merge topic 'doc-policies'
83b9029208 Help: Clarify standard policy advice paragraph wording on how policies are set
faa2bf22df Help: Drop current CMake version from standard policy advice paragraph
ad3c2c0b03 Help: Normalize and consolidate standard policy advice paragraph

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Mi-La <milan.kriz@eccam.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !9149
2024-01-16 11:06:52 -05:00
leha-bot 1bb1769235 cmake_language: Add EXIT subcommand
Add tests to cover these cases:

* run as regular CMake module, in NORMAL_MODE (expected to fail);
* run as CMake script in SCRIPT_MODE (expected to exit with given code);
* run as CMake script that `include()`-s another script with EXIT subcommand;
* run as CMake script which EVAL-uates EXIT subcommand via
  `cmake_language(EVAL CODE "<cmake code>")`.

Fixes: #23162
2024-01-16 10:41:31 +03:00