Commit Graph

34171 Commits

Author SHA1 Message Date
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
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
Brad King
a70fe8ec82 Merge topic 'add_test-empty-args' into release-3.27
1df3287bf6 add_test: Restore support for empty test arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8551
2023-06-12 06:41:40 -04:00
Brad King
5741965586 Merge topic 'Makefiles-safer-COLOR-usage' into release-3.27
8195aa3026 Makefiles: quote `$(COLOR)` expansions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8548
2023-06-09 09:58:25 -04:00
Marc Chevrier
1df3287bf6 add_test: Restore support for empty test arguments
This was regressed by refactoring in commit e08ba229ee (CMake code rely
on cmList class for CMake lists management (part. 1), 2023-04-14,
v3.27.0-rc1~174^2).  Fix it and add a test case.

Fixes: #24986
2023-06-09 09:47:52 -04:00
Brad King
5b39465ff1 CMake 3.27.0-rc1 2023-06-08 11:10:11 -04:00
Ben Boeckel
8195aa3026 Makefiles: quote $(COLOR) expansions
This handles the case where `COLOR` is set to some ANSI-like color
sequence in the ambient environment. These sequences tend to include `;`
which terminates the command and tries to use the next component
(typically an integer, possibly with a trailing `m`) with errors like:

    /bin/sh: line 1: 2: command not found
    /bin/sh: line 1: 255: command not found
    /bin/sh: line 1: 221: command not found
    /bin/sh: line 1: 255m: command not found

Also add a test that sets `COLOR` in the environment which affects the
generated Makefiles behavior.

See: https://discourse.cmake.org/t/cmake-failing-gcc-compiler-checks/8277
2023-06-08 11:05:11 -04:00
Brad King
aebf8ad1aa Merge topic 'cmcldeps-rc' into release-3.27
0e1abf7afa cmcldeps: Avoid passing /nologo more than once to RC compiler
f694e8d9c8 cmcldeps: Do not pass linker flags to cl
8600fb263b cmcldeps: Remove unused C and CXX support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8541
2023-06-08 10:45:45 -04:00
Brad King
0e1abf7afa cmcldeps: Avoid passing /nologo more than once to RC compiler
`rc /nologo /nologo ...` fails:

    fatal error RC1106: invalid option: -ologo

Fixes: #24974
Inspired-by: Benjamin Buch <benjamin.buch@technoteam.de>
2023-06-07 10:12:57 -04:00
Benjamin Buch
f694e8d9c8 cmcldeps: Do not pass linker flags to cl
Avoid cl `Command line warning D9035`.

Fixes: #24906
Co-authored-by: Brad King <brad.king@kitware.com>
2023-06-07 10:05:39 -04:00
Benjamin Buch
8600fb263b cmcldeps: Remove unused C and CXX support
We never set `CMAKE_NINJA_CMCLDEPS_{C,CXX}` anymore.
2023-06-07 08:16:40 -04:00
Brad King
c01091d2cf Begin 3.27 release versioning 2023-06-06 13:36:58 -04:00
Kyle Edwards
af69d59b09 Merge topic 'verify-interface-header-sets-skip-linting'
36ec89639a VERIFY_INTERFACE_HEADER_SETS: Skip header files that have SKIP_LINTING

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8540
2023-06-06 10:51:27 -04:00
Kyle Edwards
36ec89639a VERIFY_INTERFACE_HEADER_SETS: Skip header files that have SKIP_LINTING
Fixes: #24972
2023-06-06 10:45:22 -04:00
Brad King
53d9234395 Merge topic 'Apple-tbd-runpath-handling'
bfa5b430b3 Apple text-based stubs: ensure runpath is correctly defined

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8536
2023-06-06 09:55:34 -04:00
Kyle Edwards
0eada92663 Merge topic 'cmuvprocesschain-status-getexception'
154fe00ca5 cmUVProcessChain: Add Status::GetException() method

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8528
2023-06-06 08:41:58 -04:00
Kitware Robot
722c801da7 CMake Nightly Date Stamp 2023-06-06 00:01:11 -04:00
Kyle Edwards
154fe00ca5 cmUVProcessChain: Add Status::GetException() method 2023-06-05 11:27:45 -04:00
Brad King
3760ac9845 Merge topic 'file-api-query-command'
99b2ccf80d cmake_file_api: New project command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8530
2023-06-05 09:45:02 -04:00
Brad King
da6bb1621d Merge topic 'hip-usr-include'
f4d28d9e27 HIP: Fix implicit include directory detection under /usr/include

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8534
2023-06-05 06:42:37 -04:00
Brad King
7838ae4fd8 Merge topic 'ctest-timeout-signal'
54c5654f7d ctest: Optionally terminate tests with a custom signal on timeout
e38c05688e CTest/cmProcess: Adopt field tracking reason for the process timeout
25c1468314 cmCTestTestHandler: Remove outdated comment
41e8507ab7 IWYU: Add mapping for bits/chrono.h to chrono

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8472
2023-06-05 06:33:36 -04:00
Craig Scott
99b2ccf80d cmake_file_api: New project command
Projects can use the new command to request file API replies for the current
run. No query files are generated, the query is tracked internally. Replies are
created in the file system at generation time in the usual way.

Fixes: #24951
2023-06-05 06:20:50 -04:00
Kitware Robot
8f8a5e56f4 CMake Nightly Date Stamp 2023-06-05 00:01:35 -04:00
Marc Chevrier
bfa5b430b3 Apple text-based stubs: ensure runpath is correctly defined
This is a complement to !8204.
2023-06-04 15:29:42 +02:00
Kitware Robot
326bd503ed CMake Nightly Date Stamp 2023-06-04 00:01:08 -04:00
Kitware Robot
b0cda51ff1 CMake Nightly Date Stamp 2023-06-03 00:01:09 -04:00
Cordell Bloor
f4d28d9e27 HIP: Fix implicit include directory detection under /usr/include
The `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` are computed using
`try_compile` in `CMAKE_DETERMINE_COMPILER_ABI`, but the implicit
include directories are not known during that `try_compile`.  This can
be a problem when the HIP runtime include path is `/usr/include`,
because the runtime include path is always added to the userDirs and the
compiler automatically includes standard library headers via
`__clang_hip_runtime_wrapper.h`.

Issue: #24562
2023-06-02 11:25:06 -04:00
Brad King
a67743392b Merge topic 'cxxmodules-remove-dyndep-variable'
0183e1bca3 cxxmodules: remove `CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP` variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8524
2023-06-02 09:39:28 -04:00