Commit Graph

35166 Commits

Author SHA1 Message Date
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
Kitware Robot
bef9f0920f CMake Nightly Date Stamp 2024-01-18 00:01:10 -05: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
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
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
Kitware Robot
69b562c8ad CMake Nightly Date Stamp 2024-01-17 00:01:09 -05:00
makise-homura
9dd0ab9c88 LCC: Make CMake build without warnings on LCC 1.21 2024-01-16 22:12:07 +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
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
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
leha-bot
4f160f7906 cmakemain: Return the SCRIPT_MODE exit code if it was set
We determine it via checking cmake.Run() return code and
ScriptModeExitCode. If ScriptModeExitCode is zero, then we would return
1 if retcode was non-zero. Otherwise it will be returned if retcode was
  also non-zero.
2024-01-16 10:41:31 +03:00
leha-bot
b62dcbf5d2 cmMakefile: check cmake script mode exit code after command
Which potentially may set it, and forward it to the cmExecutionStatus
for proper handling in caller.
2024-01-16 10:41:31 +03:00
leha-bot
3d9d504646 cmMakefile: Store the exit code from cmExecutionStatus to cmake instance 2024-01-16 10:41:31 +03:00
leha-bot
9f6c937408 Source/cmake.h: Add ScriptModeExitCode for proper storing exit code
From executed CMake script in SCRIPT_MODE.
2024-01-16 10:41:31 +03:00
leha-bot
1082b9cb9a cmExecutionStatus: Add ability to set optional custom exit code 2024-01-16 10:41:31 +03:00
Kitware Robot
a68d899874 CMake Nightly Date Stamp 2024-01-16 00:01:06 -05:00
Kitware Robot
76db09fd75 CMake Nightly Date Stamp 2024-01-15 00:01:56 -05:00
Matheus Izvekov
c09f8d27cd cxxmodules: compute link information for C++ module-consuming targets
Compute link information for all C++ targets which support
modules instead of just those which may provide modules, as
they may import modules as well. This captures `OBJECT` libraries using modules
which otherwise do not have link steps.

Fixes: #25592
2024-01-14 14:14:26 -03:00
Kitware Robot
8f85931b8a CMake Nightly Date Stamp 2024-01-14 00:01:10 -05:00
Kitware Robot
1d97e51c75 CMake Nightly Date Stamp 2024-01-13 00:01:07 -05:00
Brad King
e315d7cb19 Merge topic 'swift-sources-in-resp-file'
b767917ebb Swift/Ninja: Include sources in response file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9143
2024-01-12 08:53:10 -05:00
Kitware Robot
8728fb1efc CMake Nightly Date Stamp 2024-01-12 00:01:11 -05:00
Evan Wilde
9950a69f26 Swift/Ninja: Fix compile commands output file path
The exported compile commands did not use the proper file path separator
for Windows in the output field for Swift files. This patch adds the
appropriate filepath fix-ups to the output-field.

Fixes: #25580
2024-01-11 20:31:40 -08:00
Brad King
c6d69d84db Merge topic 'file-strings-regex-match'
fa00928bcd file: `STRINGS` + `REGEX` store match results
ff0085cf74 Help: Drop incorrect versionadded mark from CMAKE_MATCH_<n>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9124
2024-01-11 10:07:48 -05:00
Kitware Robot
d8d895260f CMake Nightly Date Stamp 2024-01-11 00:01:11 -05:00
Evan Wilde
b767917ebb Swift/Ninja: Include sources in response file
Unlike C/C++, Swift compiles all sources in a module at once. This can
quickly overwhelm the commandline length limit on Windows, so it is
useful to place the source files in the response file.

Issue: #25572
2024-01-10 16:08:16 -08:00
Brad King
1e8b283554 Merge topic 'static'
9e829779f2 Swift: preserve `-static` for static library swiftmodules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9141
2024-01-10 10:20:37 -05:00
Brad King
4a9599927f Merge topic 'orkun_refactor_09_01_2024'
63d4e4ec28 Makefile: Reduce string copies
4d928592eb Makefile: Remove redundant push_back
3e533bd64f Makefile: Improve const correctness
c2dd5dfbe8 Makefile: Remove no-op call

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9142
2024-01-10 10:19:12 -05:00
Brad King
899a1f64af Merge topic 'vs-scan-for-modules'
405dc7d19c Tests/CXXModules/scan_properties: use `ixx` extension
029ddc3410 cmVisualStudio10TargetGenerator: always specify scanning
6c9614cbf4 Tests/CXXModules: add a test case for VS generation without flags
34f4423851 cmVisualStudio10TargetGenerator: fix typo in flag name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9104
2024-01-10 10:17:03 -05:00
Brad King
3160b136b2 Merge topic 'vs-scan-for-modules' into release-3.28
405dc7d19c Tests/CXXModules/scan_properties: use `ixx` extension
029ddc3410 cmVisualStudio10TargetGenerator: always specify scanning
6c9614cbf4 Tests/CXXModules: add a test case for VS generation without flags
34f4423851 cmVisualStudio10TargetGenerator: fix typo in flag name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9104
2024-01-10 10:17:01 -05:00
Brad King
446abdf324 Merge topic 'cxxmodules-no-unity'
63bbb3768d cmLocalGenerator: ignore scanned sources for unity builds
76b5383123 cmGlobalGenerator: add unity sources after computing target compile features
7fc2a83fe6 Tests/CXXModules: add a test with unity build support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9118
2024-01-10 10:15:46 -05:00
Brad King
2858af8d6b Merge topic 'cxxmodules-no-unity' into release-3.28
63bbb3768d cmLocalGenerator: ignore scanned sources for unity builds
76b5383123 cmGlobalGenerator: add unity sources after computing target compile features
7fc2a83fe6 Tests/CXXModules: add a test with unity build support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9118
2024-01-10 10:15:44 -05:00
Brad King
711e3f955a Merge topic 'makefile-depfile'
7198f0d149 Makefile: Fix double escaping when DEPFILE is used
5162ff64d4 Makefile: Reduce string copies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9138
2024-01-10 10:14:24 -05:00
Kitware Robot
87200ec97f CMake Nightly Date Stamp 2024-01-10 00:01:08 -05:00
Cristian Le
fa00928bcd file: STRINGS + REGEX store match results
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2024-01-09 16:36:55 -05:00
Saleem Abdulrasool
9e829779f2 Swift: preserve -static for static library swiftmodules
The `-static` is important for the emission of the module as it is
serialized into the swiftmodule which then is used by the Swift frontend
to decide how to link to the symbol (via the GOT or not, or the IAT on
Windows). This repairs building static libraries with Swift on Windows.
2024-01-09 09:13:34 -08:00
Brad King
38234058ff Merge topic 'ctest-cli-http-headers'
20adf8cfce ctest: allow HTTP headers via command line

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9123
2024-01-09 10:54:54 -05:00
Brad King
7557a722a5 Merge topic 'ewilde/swift-ninja-response-files'
a6a5c43300 Swift/Ninja: Add support for response files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9098
2024-01-09 10:53:59 -05:00
Brad King
1c97c57455 Merge topic 'ninja-always-make-object-dirs'
de3dc16b64 cmNinjaTargetGenerator: use `.` for the needed phony order-only dependency
1aa28f3b92 cmNinjaTargetGenerator: ensure that the object output directory exists
4a9613ff9b cmNinjaTargetGenerator: add a method to compute the object directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9105
2024-01-09 10:52:42 -05:00
Orkun Tokdemir
7198f0d149 Makefile: Fix double escaping when DEPFILE is used
In commit cfd8a5ac1f (Makefiles: Add support of DEPFILE for
add_custom_command, 2020-12-04, v3.20.0-rc1~237^2~1) we added a
`ConvertToOutputPath` call on a path given to the `depends` field of
`WriteMakeRule`.  The latter already handles escaping for Makefile
syntax.

Fixes: #25554
2024-01-09 10:44:43 -05:00
Brad King
27d958b34c Merge topic 'cmake-gui-unused-slot'
3f3c387a96 cmake-gui: Remove unused viewType slot

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9137
2024-01-09 09:54:30 -05:00
Orkun Tokdemir
63d4e4ec28 Makefile: Reduce string copies 2024-01-09 13:05:01 +01:00
Orkun Tokdemir
4d928592eb Makefile: Remove redundant push_back 2024-01-09 13:05:01 +01:00
Orkun Tokdemir
3e533bd64f Makefile: Improve const correctness 2024-01-09 13:05:01 +01:00
Orkun Tokdemir
c2dd5dfbe8 Makefile: Remove no-op call 2024-01-09 13:05:01 +01:00
Kitware Robot
44af8fb801 CMake Nightly Date Stamp 2024-01-09 00:01:08 -05:00
Matthew Woehlke
20adf8cfce ctest: allow HTTP headers via command line
Add ability to specify HTTP headers via `ctest -T Submit`.
2024-01-08 14:11:40 -05:00
Christoph Grüninger
3f3c387a96 cmake-gui: Remove unused viewType slot
The slot for `setViewType(t)` and `viewType()` are never connected.
Found by Clazy (`const-signal-or-slot`).
2024-01-08 12:45:41 -05:00