34200 Commits

Author SHA1 Message Date
Brad King
c3977582b7 CMake 3.27.4 2023-08-23 09:25:28 -04:00
Marc Chevrier
45ed175f08 list(INSERT): restore old behavior
Fixes: #25191
2023-08-17 12:07:41 +02:00
Brad King
a69c783749 CMake 3.27.3 2023-08-16 13:46:35 -04:00
Brad King
71324ce879 Merge topic 'unity_c_no_extensions' into release-3.27
7f7c443667 Unity: use C-style comments to work both with C and C++

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8718
2023-08-16 09:48:01 -04:00
Sylvain Joubert
7f7c443667 Unity: use C-style comments to work both with C and C++
Update the comment added by commit 485256f2d0 (Unity: Suppress
clang-tidy 'bugprone-suspicious-include' warning, 2023-04-27,
v3.27.0-rc1~149^2) to work for C.

Fixes: #25184
2023-08-15 10:23:54 -04:00
William Sciaroni
5a41d926dd GHS: Escape custom command comments
Fixes: #25171
2023-08-15 09:53:41 -04:00
Brad King
f3d9a82110 CMake 3.27.2 2023-08-10 11:30:44 -04:00
Brad King
89b611ab32 VS: Select latest Windows SDK even when targeting Windows 8.1 and below
The policy added by commit f90c8ab54e (VS: Select latest available
Windows SDK version by default, 2023-04-03, v3.27.0-rc1~206^2~1) applied
only when targeting Windows 10+.  Apply it to older versions too.

Fixes: #25170
Issue: #16202
2023-08-10 09:59:25 -04:00
Brad King
ae97d82e83 VS: Teach CMAKE_GENERATOR_PLATFORM to support Windows 8.1 SDK selection
Honor an explicit `version=8.1` field value regardless of the Windows
target version.

Issue: #25170
2023-08-10 09:57:00 -04:00
Brad King
15ff89654b VS: Teach CMAKE_GENERATOR_PLATFORM to use Windows 10 SDKs for older versions
Honor an explicit `version=` field selecting a Windows 10 SDK regardless
of the Windows target version.

Issue: #25170
2023-08-10 09:34:50 -04:00
Brad King
bba1a23da9 VS: Consolidate Windows SDK major version selection dispatch
Make logic choosing between Windows 10 SDKs and the Windows 8.1 SDK
easier to follow by consolidating it in the VS 14 generator.  The only
information we need from VS 15+ generators is whether the 8.1 SDK is
installed.
2023-08-10 09:33:20 -04:00
Brad King
209973e510 VS: Do not print empty Windows SDK version when none is selected 2023-08-10 09:33:19 -04:00
Brad King
4a8f9260c5 Merge topic 'file-GENERATE-arg-parsing' into release-3.27
88f90a72f1 file(GENERATE): Restore INPUT|CONTENT parse checking

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8694
2023-08-08 10:06:38 -04:00
Brad King
741d19896c Merge topic 'cmList-append-regression' into release-3.27
7f9f96151a cmList: Fix performance regression in append/prepend

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8684
2023-08-08 09:39:04 -04:00
Evan Wilde
88f90a72f1 file(GENERATE): Restore INPUT|CONTENT parse checking
Refactoring in commit bff468c988 (cmFileCommand: Use cm::optional for
keyword argument presence, 2022-06-30, v3.25.0-rc1~512^2) accidentally
broke the check that the input argument is either `INPUT` or `CONTENT`.

The check is supposed to fail when arguments are passed in the wrong
order.  For example:

    file(GENERATE OUTPUT ...
         TARGET <target>
         CONTENT <content>)

Prior to this fix, the input method would be CONTENT, but because the
first parsed keyword is not `CONTENT`, `inputIsContent` would be false.
The first parsed keyword isn't INPUT either, so we would not continue
into the error condition. CMake would then try to handle this as an
input file, when there isn't one, resulting in uninitialized memory
usage and segfaults or corruption later on.

Fixes: #25169
2023-08-07 19:17:29 -04:00
Craig Scott
bd365b520e Merge topic 'doc-fixups-release-3.27' into release-3.27
78e7ea598d cmLocalGenerator: Fix trivial spelling error in code comment
1285fe27ff Help: Improve formatting and fix wording for ENABLE_EXPORTS
91336d061c Help: Improve formatting and cross-references for DEPENDS_EXPLICIT_ONLY
03208d9e18 Help: Fix indenting within TARGET_RUNTIME_DLLS genex docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8688
2023-08-07 18:10:55 -04:00
Craig Scott
78e7ea598d cmLocalGenerator: Fix trivial spelling error in code comment 2023-08-06 18:23:24 +10:00
Marc Chevrier
7f9f96151a cmList: Fix performance regression in append/prepend
Fixes: #25147
2023-08-04 09:52:08 +02:00
Brad King
0d1529000d VS: Revert "Add CMake input files to ZERO_CHECK"
Since commit df58dbb0e9 (VS: Add CMake input files to ZERO_CHECK,
2023-03-19, v3.27.0-rc1~157^2), projects that specify the same file both
as input to `configure_file` and as the `MAIN_DEPENDENCY` of a custom
command fail to configure.  Revert the change pending further
investigation.  Add a test case demonstrating the problem.

Issue: #24557
Fixes: #25149
2023-08-02 11:53:48 -04:00
Brad King
78bbd58545 Source: Link libatomic when needed on Linux 32-bit ARM
Fixes: #25114
2023-07-27 11:07:21 -04:00
Brad King
b5c54d9c8a CMake 3.27.1 2023-07-25 13:58:09 -04:00
Brad King
d5b5af6ce8 Merge topic 'property-typo-fix' into release-3.27
c172eecea6 cmTarget: Restore Fortran_PREPROCESS property initialization

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8654
2023-07-25 13:55:55 -04:00
Ben Boeckel
c172eecea6 cmTarget: Restore Fortran_PREPROCESS property initialization
Fix a typo from commit e522f8ca06 (cmTarget: factor out properties
initialized for target which compile, 2023-02-01, v3.27.0-rc1~577^2~13),
that broke this property.

Also update the test suite to use this upgrade as some level of
coverage.

Fixes: #25123
2023-07-25 11:35:24 -04:00
Brad King
d89bcc8891 Merge topic 'cdash_checksum_400' into release-3.27
b7c871f745 ctest: Update ctest_submit for CDash behavior change

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8648
2023-07-25 11:03:05 -04:00
Zack Galbreath
b7c871f745 ctest: Update ctest_submit for CDash behavior change
open.cdash.org was recently upgraded in preparation for the release of
CDash v3.2.0. This upgrade brought a change in behavior where CDash now
responds with HTTP 400 (bad request) rather than HTTP 200 (OK) for MD5
checksum mismatches during submission time.

This commit removes our usage of CURLOPT_FAILONERROR in
cmCTestSubmitHandler.cxx This was necessary to pass along the contents
of the request body ("md5 mismatch") in cases where the web server
(CDash) responds with an error status (400).

Fixes: #25121
2023-07-25 09:09:56 -04:00
Kyle Edwards
0e8584c89c CTest: Fix regression in calculating test timeout
Fixes: #25120
2023-07-24 19:29:54 -04:00
Ben Boeckel
b665966933 cmComputeLinkInformation: track OBJECT library dependencies
In commit b6a5382217 (Ninja: depend on language module information files
directly, 2023-02-10), introduced via !8197, language-specific module
information files (`CMakeFiles/<target>.dir/<lang>Modules.json`) files
were added as real dependencies to the dyndep collation steps.
Previously, the behavior was to inform the collator of all possible
targets and search for the files manually ignoring those which did not
exist with ordering enforced by depending on the linker output of all
dependent targets. This behavior could lead to stale information being
used (e.g., if a target stops providing any targets) and also did not
reliably build everything needed on rebuilds. Afterwards, the internal
computation changed the dependency from all possible targets to an exact
set of "these targets might have modules" query, however one that did
not include `OBJECT` libraries since do not have `LinkEntry` items
internally (their objects are instead treated as source files).

As a stopgap measure, track `OBJECT` libraries in a separate list and
query them explicitly when gathering targets which may have interesting
information. Future work can add `LinkEntry` items to represent these
targets once all `LinkEntry` consumers have been audited to make sure
they are not surprised by any `OBJECT` library entries.

Fixes: #25112
2023-07-22 07:12:43 -04:00
Brad King
01c62f4ff0 CMake 3.26.5 2023-07-19 13:56:04 -04:00
Brad King
784596bd08 CMake 3.27.0 2023-07-18 13:52:42 -04:00
Jannik Alber
c80190c6ab InnoSetup: Always specify at least one component installation type
Inno Setup implicitly creates three installation types if none is
specified in the script. This causes some component features (e.g.
`REQUIRED`) to lose their functionality.  Teach the generator to always
specify a "custom" installation type when using components.

Fixes: #25083
2023-07-17 10:30:25 -04:00
Brad King
8bcba75b1c CMake 3.27.0-rc5 2023-07-14 11:03:52 -04:00
Ben McMorran
60b6383993 Debugger: Always clear existing breakpoints on setBreakpoints
Fixes: #25063
2023-07-13 08:44:52 -04:00
Brad King
d769c59d78 Merge topic 'debugger-no-supportsVariableType' into release-3.27
e02cf3f190 Debugger: Correctly handle clients without supportsVariableType

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Garrett Campbell <gcampbell@microsoft.com>
Merge-request: !8620
2023-07-13 08:36:24 -04:00
Brad King
91333f1b99 Merge topic 'genex-REMOVE_DUPLICATES-empty' into release-3.27
861dd60ecf Genex: Restore REMOVE_DUPLICATES preservation of empty elements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8623
2023-07-13 08:34:21 -04:00
Brad King
861dd60ecf Genex: Restore REMOVE_DUPLICATES preservation of empty elements
Refactoring in commit 72d116ee68 (GenEx: list oriented genexes use
cmList class, 2023-03-29, v3.27.0-rc1~205^2) accidentally caused
empty elements to be dropped by the `REMOVE_DUPLICATES` genex.
Fix it and add a test case.

Fixes: #25080
2023-07-12 11:49:21 -04:00
Alexandru Croitor
bddd8f0e54 cmWorkerPool: Show process exit code / signal number upon failure
Previously if an AUTOGEN process like moc exited with a non-zero exit
code, cmWorkerPool would not populate the result's ErrorMessage
because it mistakenly thought that if the ExitCode / TermSignal had a
non-zero value, the ErrorMessage must have already been set.

This was a wrong assumption.

Instead, check if ErrorMessage is empty, and if it is, set it to
whatever the exit code or term signal number is.
2023-07-12 10:29:49 -04:00
Ben McMorran
e02cf3f190 Debugger: Correctly handle clients without supportsVariableType
Fixes: #25057
2023-07-12 10:09:21 -04:00
Brad King
fbe5f49d63 Merge topic 'compile-commands-modules' into release-3.27
677b28dc7b Ninja: include module mapper flags in `compile_commands.json`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8611
2023-07-12 10:02:52 -04:00
Ben Boeckel
677b28dc7b Ninja: include module mapper flags in compile_commands.json
Fixes: #24618
2023-07-09 11:04:29 -04:00
Brad King
8a07bcc149 MSVC: Restore support for non-incremental linking without 'rc' in PATH
Since commit 0b552eb877 (MSVC: Embed manifests directly for
non-incremental vs_link_exe links, 2023-02-20, v3.27.0-rc1~438^2) we
tell the MSVC `link` tool to embed manifests directly rather than
running `mt` ourselves.  However, `link` expects `rc` to be in the PATH
when embedding manifests.  Although that is normally true, some users
prepare minimal environments and explicitly specify include and link
directories for the Windows SDK.  In such cases, `rc` is not in the PATH
and is explicitly specified in `CMAKE_RC_COMPILER`.  Restore support for
such cases by explicitly adding the RC location to the end of the PATH.

Fixes: #25047
2023-07-06 08:11:34 -04:00
Brad King
b384058e4b CMake 3.27.0-rc4 2023-06-30 10:31:40 -04:00
Brad King
1cc4e97e87 Merge topic 'debugger-segfault' into release-3.27
764258771a Debugger: Fix threads request segfault after thread exited event

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8604
2023-06-30 09:30:20 -04:00
Ben McMorran
764258771a Debugger: Fix threads request segfault after thread exited event
Fixes: #25041
2023-06-29 13:25:51 -04:00
Brad King
b9c99830c5 VS: Fix C++ modules in source files with the same name
When multiple source files in a single target have the same name, we
already set `ObjectFileName` explicitly to avoid a `.obj` collision. For
C++ module sources, set `Module{Output,Dependencies}File` to avoid
`.ifc` and `.module.json` collisions.

Fixes: #25038
2023-06-28 06:43:10 -04:00
Brad King
f58c7659d8 Merge topic 'vs-sdk-selection' into release-3.27
a4d532e998 VS: Restore Windows SDK selection with platform in generator name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8583
2023-06-23 10:52:48 -04:00
Andreas Weis
d90a61d671 VS: Make C++ module BMIs public by default for shared libraries
Enable the `AllProjectBMIsArePublic` option for shared libraries in the
VS project files when building with C++20 modules support.
2023-06-22 14:22:56 -04:00
Brad King
a4d532e998 VS: Restore Windows SDK selection with platform in generator name
Refactoring in commit e259063b0a (VS: Defer Windows SDK selection until
CMAKE_GENERATOR_PLATFORM is known, 2023-03-31, v3.27.0-rc1~206^2~5)
accidentally dropped the Windows SDK selection code path for VS
generators named with the old-style platform suffix.

Fixes: #25007
2023-06-22 11:22:08 -04:00
Brad King
0cd5300665 CMake 3.27.0-rc3 2023-06-20 13:11:25 -04:00
Marc Chevrier
1cfaed0684 list(): restore SUBLIST behavior
Fixes: #25002
2023-06-16 15:14:03 +02:00
Brad King
66f7d9e6e0 CMake 3.27.0-rc2 2023-06-12 13:24:29 -04:00