Commit Graph

35903 Commits

Author SHA1 Message Date
Orkun Tokdemir
fb978f001d GeneratorTarget: Fix missing system include cache key
When 033dc7ee2f introduced
`AddSystemIncludeDirectory()`, the function was not handling the
situation which a system include cache key is not added properly like
in `IsSystemIncludeDirectory()`. The error was not exposed when
`AUTOMOC` is `ON` and  `AUTOUIC` is `ON` because
`GetIncludeDirectoriesImplicit()` inside `initMoc()` was triggering
`IsSystemIncludeDirectory()`.

This commit adds calling
`AddSystemIncludeCacheKey()` inside `AddSystemIncludeDirectory()`
when the system include cache key is not added before.

Fixes: #26146
2024-07-23 16:58:43 +02:00
Orkun Tokdemir
7d8d239574 GeneratorTarget: Factor out AddSystemIncludeCacheKey() 2024-07-22 17:03:20 +02:00
Kitware Robot
a9c5dec8d0 CMake Nightly Date Stamp 2024-07-22 00:03:17 -04:00
Kitware Robot
2f8c67d869 CMake Nightly Date Stamp 2024-07-21 00:01:16 -04:00
Kitware Robot
587a3b41ba CMake Nightly Date Stamp 2024-07-20 00:01:37 -04:00
Brad King
f99e6101d0 Merge topic 'cmMakefile-refactoring'
62bb8a77a5 cmMakefile: Teach ConfigureFile to move the temp file instead of copying it
dc38f81237 cmSystemTools: Revise MoveFileIfDifferent to return cmsys::Status
0a0a826b86 cmMakefile: Use find_if instead of manual loop
e0294fa310 cmMakefile: Replace single-char string literal with char for cmStrCat
206961bc60 cmMakefile::FormatListFileStack: Refactor "manual" loop into algorithms
2e16b58b7c cmStringAlgorithms: Move generic strings join function to public API
ce991188f3 cmMakefile::FormatListFileStack: Exit early on empty stack trace
29fb605822 cmMakefile::FormatListFileStack: Refactor 'while' into 'for'
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9635
2024-07-19 10:05:03 -04:00
Brad King
a444929cf4 Merge topic 'autogen-ui-rebuild'
5363bebc1e Autogen: Fix compilation of unchanged source files
68ea116380 Autogen: Fix autogen test separation bugs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9660
2024-07-19 10:01:43 -04:00
Brad King
4e867bab6c Merge topic 'ctest-failure-summary-labels'
49e9f817de ctest: Display test labels in failure summary

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9652
2024-07-19 09:56:58 -04:00
Brad King
a8d8f26828 Merge topic 'aix-archive-shared-libraries'
d27fe9dfba AIX: Add option to archive shared libraries
98013ad1ca cmXCOFF: Add support for editing binary inside an archive

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9606
2024-07-19 09:55:58 -04:00
Kitware Robot
c7fca321b9 CMake Nightly Date Stamp 2024-07-19 00:01:14 -04:00
Alex Turbov
62bb8a77a5 cmMakefile: Teach ConfigureFile to move the temp file instead of copying it
In the variables substitution mode `cmMakefile::ConfigureFile`
was copy file and then remove temporary rendered file.

With updated signature of `MoveFileIfDifferent` it can be used
instead of `CopyFileIfDifferent`.
2024-07-18 10:29:47 -04:00
Alex Turbov
dc38f81237 cmSystemTools: Revise MoveFileIfDifferent to return cmsys::Status
Help callers recover errors without relying on global state.
2024-07-18 10:29:47 -04:00
Alex Turbov
0a0a826b86 cmMakefile: Use find_if instead of manual loop
...in the `cmMakefile::ValidateCustomCommand()` as it was a warning
issued by `clang-tidy`.
2024-07-18 10:29:47 -04:00
Alex Turbov
e0294fa310 cmMakefile: Replace single-char string literal with char for cmStrCat
Also, remove redundant quote escapes.
2024-07-18 10:29:46 -04:00
Alex Turbov
206961bc60 cmMakefile::FormatListFileStack: Refactor "manual" loop into algorithms 2024-07-18 10:29:46 -04:00
Alex Turbov
2e16b58b7c cmStringAlgorithms: Move generic strings join function to public API
Move `cmJoinImpl` from `cmStringAlgorithms.cxx` to the
`cmStringAlgorithms.h` as `cmJoinStrings`.  Two existing overloads are
not suitable for reverse iterators due to the hardcoded type of the
first parameter.

The signature is similar to the generic (template) `cmJoin`.  With
`enable_if` "magic", `cmJoinString` could be renamed to `cmJoin` in the
future.

Also, replace `getJoinedLength` with `std::accumulate`.
2024-07-18 10:29:46 -04:00
Alex Turbov
ce991188f3 cmMakefile::FormatListFileStack: Exit early on empty stack trace
And deindent the rest of the function.
2024-07-18 10:29:46 -04:00
Alex Turbov
29fb605822 cmMakefile::FormatListFileStack: Refactor 'while' into 'for' 2024-07-18 10:29:46 -04:00
Alex Turbov
b8fb4b778c cmMakefile::ConfigureFile: Convert 'else' block to early return and deindent 2024-07-18 10:29:46 -04:00
Alex Turbov
d4faff52d3 cmMakefile: strnspn => std::strnspn 2024-07-18 10:29:45 -04:00
Alex Turbov
1df30b6bf2 cmMakefile: Use cmStrCat instead of std::stringstream 2024-07-18 10:29:45 -04:00
Alex Turbov
33986a1c60 cmMakefile: Remove redundant << stream operators 2024-07-18 10:29:45 -04:00
Alex Turbov
b9a5a2b494 cmMakefile: Replace ternary with bool => int cast 2024-07-18 10:29:45 -04:00
Brad King
de8e176113 Merge topic 'parallel-install'
159ba027b9 Install: Add parallel installation option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9611
2024-07-18 09:04:47 -04:00
Brad King
89dc9a6c41 Merge topic 'ninja-custom-target-build-event-dollar'
c3c14f04f2 Ninja: Fix build event commands with $-sign on custom targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9662
2024-07-18 09:00:30 -04:00
Brad King
f2e52b3124 Merge topic 'vs-cuda'
a9210a0c02 VS: Restore support for CUDA with no optimization flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !9666
2024-07-18 08:57:48 -04:00
Brad King
24f3862628 Merge topic 'macos-curl-backend'
f2596dfa0e macOS: Work around bug in system curl 8.{3,4,5} LibreSSL backend

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9663
2024-07-18 08:56:32 -04:00
Kitware Robot
9e6690abeb CMake Nightly Date Stamp 2024-07-18 00:01:11 -04:00
Wim Colgate
49e9f817de ctest: Display test labels in failure summary
In a complex test environment, there may be a desire to add a test
property label to indicate context. Here is one such example:

    set_property(TEST mygoofytest PROPERTY LABELS might-fail-on-config-change)

Upon looking at the failed test summary, one can quickly decide whether
the failure might be expected or not.

    198 - mygoofytest (Failed)                might-fail-on-config-change
2024-07-17 13:56:01 -04:00
Orkun Tokdemir
5363bebc1e Autogen: Fix compilation of unchanged source files
Since generated `ui` headers are added as byproducts of the autogen
target, it causes to compilation of unchanged files.

This commits adds generated `ui` headers to byproducts of the
timestamp target instead of the autogen target's.

Fixes: #25436
Fixes: #26135
2024-07-17 18:12:04 +02:00
Aditya Vidyadhar Kamath
d27fe9dfba AIX: Add option to archive shared libraries
Add option `CMAKE_AIX_SHARED_LIBRARY_ARCHIVE`.

There will no versions for the shared objects when this option is used.

Closes: #26033
2024-07-17 11:52:09 -04:00
Brad King
a9210a0c02 VS: Restore support for CUDA with no optimization flags
Since commit 67de5b7b82 (VS: Suppress MSBuild default settings affected
by UseDebugLibraries, 2024-02-13, v3.30.0-rc1~538^2~1) we generate an
empty `Optimization` element for the host compiler when there are no C
or C++ optimization flags enabled.  The CUDA Toolkit Visual Studio
integration fails with an error if an empty string is inherited from the
host compiler's `Optimization` element.  If no CUDA optimization flags
are specified, write an explicit empty `Optimization` element for the
CUDA compiler too.

Fixes: #26144
2024-07-17 11:42:31 -04:00
Brad King
046c63e376 Merge topic 'revert-autorcc-timestamp'
9ffac91e37 Autogen: Revert "Add timestamp file for CMAKE_GLOBAL_AUTORCC_TARGET"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9649
2024-07-17 09:46:29 -04:00
Dávid Péter Jánosa
c3c14f04f2 Ninja: Fix build event commands with $-sign on custom targets
Fixes: #26143
2024-07-17 09:27:35 -04:00
Brad King
f2596dfa0e macOS: Work around bug in system curl 8.{3,4,5} LibreSSL backend
Since commit d3cbee99e3 (macOS: Prefer building with system-provided
curl, 2024-05-09, v3.30.0-rc1~130^2~1) CMake uses the macOS-provided
curl, which uses the LibreSSL backend by default.  This exposes us to
curl issue 12525, created and fixed by the following upstream curl
commits:

* commit `bec0c5bbf` (openssl: switch to modern init for
                      LibreSSL 2.7.0+, 2023-08-07, `curl-8_3_0~201`)
* commit `9f2d2290d` (openssl: re-match LibreSSL deinit with init,
                      2023-12-15, `curl-8_6_0~219`)

Work around the bug by preferring the secure-transport backend by
default on the problematic versions of curl.
2024-07-17 09:13:26 -04:00
Kitware Robot
4a382aa8dd CMake Nightly Date Stamp 2024-07-17 00:01:10 -04:00
Brad King
d34b428071 Merge topic 'custom-transitive-properties'
7a77a6c642 Restore support for exporting INTERFACE with missing dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !9656
2024-07-16 10:32:15 -04:00
Kitware Robot
8e5388573c CMake Nightly Date Stamp 2024-07-16 00:01:11 -04:00
Brad King
7a77a6c642 Restore support for exporting INTERFACE with missing dependencies
Since commit c16acd35b3 (GenEx: Add support for custom transitive link
properties, 2024-05-09, v3.30.0-rc1~82^2) evaluation of
`TRANSITIVE_LINK_PROPERTIES` by `install(EXPORT)` enables discovery of
missing dependencies on INTERFACE libraries that we did not previously
diagnose.  This regressed existing projects that relied on such
non-diagnosis.  Although commit 2fc9e482a9 (Evaluation of
TRANSITIVE_LINK_PROPERTIES isn't considered a usage, 2024-07-05) fixed
this, it also made a significant change to the `UseTo` infrastructure
that may have other subtle effects.  Replace the fix with an approach
that explicitly models suppression of the relevant diagnostics.

Fixes: #26108
2024-07-15 14:08:10 -04:00
Martin Duffy
159ba027b9 Install: Add parallel installation option
Fixes: #26000
2024-07-15 11:49:29 -04:00
Kitware Robot
ac4f6d513d CMake Nightly Date Stamp 2024-07-15 00:01:34 -04:00
Kitware Robot
0dfecc01fe CMake Nightly Date Stamp 2024-07-14 00:01:28 -04:00
Kitware Robot
36491101f5 CMake Nightly Date Stamp 2024-07-13 00:01:42 -04:00
Kitware Robot
228fd59897 CMake Nightly Date Stamp 2024-07-12 00:01:10 -04:00
Kitware Robot
de8911120e CMake Nightly Date Stamp 2024-07-11 00:01:22 -04:00
Orkun Tokdemir
9ffac91e37 Autogen: Revert "Add timestamp file for CMAKE_GLOBAL_AUTORCC_TARGET"
In the commit 8d99e71b, a new timestamp file was added to prevent
unneeded `AUTORCC` triggering after successful builds when
`CMAKE_GLOBAL_AUTORCC_TARGET` is ON. This caused a regression that
configuration fails when multiple `.qrc` files are added to a target.
This commits reverts 8d99e71b.

Issue: #26059
Fixes: #26126
2024-07-10 15:22:02 +02:00
Kitware Robot
e9fa1a3a18 CMake Nightly Date Stamp 2024-07-10 00:01:46 -04:00
Brad King
0b5df717ba Merge topic 'preset-comments'
ccd4612296 cmJSONState: Add missing member initializer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9645
2024-07-09 14:16:12 -04:00
Kitware Robot
8fe9454bcc CMake Nightly Date Stamp 2024-07-09 00:01:58 -04:00
Aditya Vidyadhar Kamath
98013ad1ca cmXCOFF: Add support for editing binary inside an archive
AIX stores XCOFF `.so` binaries inside `.a` archives.

Issue: #26033
2024-07-08 12:06:47 -04:00