This adds a `CMAKE_FIND_REQUIRED` variable which causes `find_package`,
`find_path`, `find_file`, `find_library` and `find_program` to be
considered `REQUIRED` by default.
It also introduces an `OPTIONAL` keyword to those commands, allowing
them to ignore the value of this variable.
Issue: #26576
`difftime` returns a `double`, so commit 6727270b75 (CMake: Extend
TIMESTAMP sub-commands with new unix time format specifier, 2016-02-16,
v3.6.0-rc1~338^2) cast it to `long` to get an integer result. However,
in the MSVC ABI, `long` is a 32-bit integer. Use an explicit 64-bit
integer type instead.
Fixes: #26716
Previously the presets handler in the GUI was on a timer. Because of
this, error messages got suppressed after the first one (even if the
error message is different from the one originally suppressed).
Add a "reload presets" button which forces the preset to reload, and
always provides an error message if the reload failed.
Fixes: #26707
XCode 16+ no longer delays our POST_BUILD phase until after bundle files
like `Info.plist` are generated. Teach the Xcode generator to add
explicit dependencies to the POST_BUILD phase in bundle targets to
ensure the files are created before it runs.
Fixes: #26656
Modify how cmExportBuildFileGenerator::FindExportInfo collects target
export information to properly record the export sets which export a
target. (The old behavior treated every invocation as a separate set,
which is reasonable for export(TARGETS) but does not allow referencing a
target exported multiple times via export(EXPORT). This reflects recent
changes to allow this for installed exports.)
The `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` target properties
establish the graph of link dependencies used to propagate usage
requirements transitively. Therefore the `$<TARGET_PROPERTY:...>`
generator expression should evaluate them transitively as it does for
other transitive properties. Add policy CMP0189 for compatibility.
Fixes: #26709
Issue: #12435
Fix logic from commit b9ee79b8a1 (GenEx: Add support for custom
transitive compile properties, 2024-05-09, v3.30.0-rc1~82^2~1) to more
precisely know when we are computing the link dependency graph.
Issue: #20416
Issue: #26709
In commit e8010b67c7 (cmGeneratorExpressionDAGChecker: Make local
generator available in constructor, 2024-04-25, v3.30.0-rc1~172^2~6)
we accidentally failed to preserve `EvaluateInterfaceProperty`'s
consistency with `TargetPropertyNode::Evaluate`. Fix its local
generator selection to match the evaluation context.
245f5ca8b3 Tests: Make CMakeGUI test build with both Qt5 and Qt6
5afbc739dc ci: Specify Qt version separately for each Fedora build
e35d1ee4cd cmake-gui: Clarify variable name for selected Qt major version
19a1c115e0 cmake-gui: Fix integer conversion warnings with Qt 6
cbf0d3da52 cmake-gui: Port away from deprecated API in Qt >= 6.7
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10369
Extend commit 1a35351125 (Add CMAKE_POLICY_VERSION_MINIMUM to help
configure outdated projects, 2025-02-13, v4.0.0-rc1~12^2) with an
environment variable to initialize the cache entry. That will make it
easier to use when `cmake` is invoked under layers of scripting.
Closes: #26715
8d455809b0 string: Allow zero-length matches in all REGEX subcommands
ca65fa9a7f string: Allow references to unmatched groups in REGEX REPLACE
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10251
321c647640 Include source file without an extension after the same name with an extension
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10271
a6d4a9a2ae ctest: Include cmake instrumentation data in XML files
85a63143ed instrument: don't report target=TARGET_NAME
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10332
a6d4a9a2ae ctest: Include cmake instrumentation data in XML files
85a63143ed instrument: don't report target=TARGET_NAME
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10332
28f1da4b25 ci: Add jobs to build sunos-{i386,sparc} binaries
59ed18e54d Utilities/Release: Add base images to build sunos-{i386,sparc} binaries
a4e5719d31 Solaris: Rename local variable to avoid conflict with system headers
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10350
Modify cmExportPackageInfoGenerator to record not just what packages are
required, but what targets (components) are used by those requirements,
and to populate the requirements' component lists accordingly.
80ec307900 curl: Set build options the way we need for CMake
ba77812035 Merge branch 'upstream-curl' into update-curl
1865f86e28 curl 2025-02-13 (57495c64)
302d842f6e curl: Update script to get curl 8.12.1
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10342
80ec307900 curl: Set build options the way we need for CMake
ba77812035 Merge branch 'upstream-curl' into update-curl
1865f86e28 curl 2025-02-13 (57495c64)
302d842f6e curl: Update script to get curl 8.12.1
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10342
The semantics mimic other languages like Python, Java, JS, etc.
To advance past a zero-length match, the search algorithm first
tries to find a non-zero alternative branch. If that fails, it
force-advances by 1 character.
Fixes: #13790, #13792, #18690, #26629
CMP0115 requires that source files listed in CMake must include their
file extension, but there are cases when projects have different source
files with the same name, but one with an extension and one without.
In the current state, CMake will ignore the file without the extension
an always map it to the file with an extension.
```cmake
add_library(foo bar.c bar)
```
In the above example, the target `foo` will only recognize and depend on
`bar.c` and miss the file `bar` unless `bar` comes before `bar.c` in the
source list.
This issue also affects how custom commands emit files.
This change adds a new policy to recognize files with and without a file
extension as different files, both when building targets, and when they
are being created.
Fixes: #26058
5d039f3be3 regex: Match ^ at most once in repeated searches
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10221
e5fd973b14 VS: Set the linker image version using the target's VERSION property
2e798a4137 VS: Fix UnityBuild test selection in VS10Project tests
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10307
Set options added by the update to curl 8.12.1.
In particular, now that upstream curl's CMake code depends on
OpenSSL via imported targets from FindOpenSSL, we can let it
handle the transitive dependency on posix threads.
NSIS macro variables MUI_*_BITMAP require Windows-style paths.
Don't rely on the user and convert them explicitly.
For good measure, also convert the paths for MUI_PAGE_LICENSE,
MUI_ICON and MUI_UNIICON.
Note that NSIS scripts only require quotes for strings with spaces
and ConvertToWindowsOutputPath() handles this automatically.
Fixes: #9945
Autogen contains code to forward dependencies from an origin target
to its associated <origin>_autogen target. This code also contains a
check to skip forwarding a dependency if it does not appear in the
dependency graph for all configured build types.
This is done by counting the number of times a dependency appears in
the graph for each configured build type.
Unfortunately the code did not account for the case when a dependency
appears more than once in the link graph for a single build type. This
means that for a single-config build, if the same dependency is linked
twice, the dependency will be skipped altogether.
This can lead to build errors in a project where a hypothetical App
target depends on a Lib target, and thus expects App_autogen to depend
on Lib_autogen and any of its dependencies, but the latter is skipped.
Fix this by incrementing the count of a target in the dependency graph
only once per build type.
Fixes: #26700
Provide packagers and end users with a way to try configuring projects that
have not been updated to set their policy version to a supported level.
Closes: #26698
When doing successive matches, track the input start and current search
start positions separately to prevent the `^` anchor from matching in
the middle of the string. Add policy CMP0186 to provide compatibility.
Issue: #26629Fixes: #16899
Update cmPackageInfoReader's version parsing to more fully conform to
the specification and to reject non-conforming version strings. Start
adding framework to support version schemas other than "simple". Fix how
cmFindPackageCommand extracts version parts to not fail if more than
four parts are present.
b902fbd0c6 execute_process: Clarify when a Windows command interpreter is used
e388ed687a execute_process: Improve invocation of .cmd/.bat with spaces
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nikita Nemkin <nikita@nemkin.ru>
Acked-by: Alexey Edelev <alexey.edelev@qt.io>
Merge-request: !10321
b902fbd0c6 execute_process: Clarify when a Windows command interpreter is used
e388ed687a execute_process: Improve invocation of .cmd/.bat with spaces
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nikita Nemkin <nikita@nemkin.ru>
Acked-by: Alexey Edelev <alexey.edelev@qt.io>
Merge-request: !10321
Modify cmPackageInfoReader to also append the configuration to the
IMPORTED_CONFIGURATIONS property of every target which has configuration
specific properties. We retain pre-populating this with the package's
default_configurations (if specified) in order to ensure that those are
given preference, but we also need to add every configuration that
actually exists in order to ensure that the target is usable, especially
if default_configurations was not provided.
Modify cmPackageInfoReader to not require schema_version in supplemental
files (i.e. appendices and/or configuration-specific files). This is
important as our own generation is not including cps_version in
supplemental files, and it is forbidden in the same according to a
strict reading of the specification.
Extend the fix from commit 74c9d40876 (execute_process: Fix invocation
of .cmd/.bat with spaces, 2025-01-31) to work without relying on
conversion to a "short path", which may not exist. Instead, extending
the `cmd /c` wrapper to `cmd /c call` seems to support spaces directly.
Suggested-by: Alexandru Croitor <alexandru.croitor@qt.io>
Fixes: #26655