Commit Graph

37629 Commits

Author SHA1 Message Date
Brad King 5dd4af194e Merge topic 'vs-link-defaults' into release-4.1
99d09ec45a VS: Suppress MSBuild default link flags not specified by project or user

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10891
2025-06-19 10:20:47 -04:00
AJIOB 99d09ec45a VS: Suppress MSBuild default link flags not specified by project or user
MSBuild adds some `link` flags by default, but for CMake they may not
match what's produced by command-line generators.  If these flags are
not specified by the project or user, suppress them.

Fixes: #27004
2025-06-17 14:12:43 -04:00
Brad King ce6e309971 Begin 4.1 release versioning 2025-06-17 10:54:43 -04:00
Brad King 68eb6fb683 Merge topic 'xcode-build-workspace'
26869fb4ba cmake --build: Fix building multiple targets in Xcode workspace

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10875
2025-06-17 09:11:48 -04:00
Brad King e227c5a9a4 Merge topic 'fix-package-metadata-arg-parsing'
bb1e00b92c cmPackageInfoArguments: Validate new arguments
0fcea1b15e cmPackageInfoArguments: Simplify argument checking

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10885
2025-06-17 09:08:05 -04:00
Kitware Robot d874008677 CMake Nightly Date Stamp 2025-06-17 00:07:36 -04:00
Kitware Robot a2dc4b4e9b CMake Nightly Date Stamp 2025-06-16 00:04:59 -04:00
Kitware Robot 48d03d011c CMake Nightly Date Stamp 2025-06-15 00:04:38 -04:00
Stepanov Igor 26869fb4ba cmake --build: Fix building multiple targets in Xcode workspace
Extend commit 844d79916a (cmake --build: Add support for driving Xcode
workspaces, 2025-06-02) to support multiple `--target` arguments.
`xcodebuild -scheme` cannot be repeated in a single call, so call it
multiple times instead.

Issue: #26958

Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2025-06-14 16:53:25 +10:00
Kitware Robot 326cd28d24 CMake Nightly Date Stamp 2025-06-14 00:04:26 -04:00
Matthew Woehlke bb1e00b92c cmPackageInfoArguments: Validate new arguments
Add validation of recently added `DESCRIPTION` and `HOMEPAGE_URL`
arguments to `export`/`install` commands.
2025-06-13 14:30:46 -04:00
Matthew Woehlke 0fcea1b15e cmPackageInfoArguments: Simplify argument checking
Refactor cmPackageInfoArguments::Check to use helper macros for
repetitive argument validation.
2025-06-13 14:17:00 -04:00
Brad King b57c5fbe56 Merge topic 'file-set-install-fix'
d71b59a4f7 install(TARGETS): Don't ignore non-extant file sets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !10878
2025-06-13 09:44:05 -04:00
Kitware Robot 966dc40fff CMake Nightly Date Stamp 2025-06-13 00:04:30 -04:00
Vito Gamberini d71b59a4f7 install(TARGETS): Don't ignore non-extant file sets
When installing FILE_SETs, it is possible the FILE_SET has not yet been
created with target_sources(FILE_SET). Instead of ignoring this
situation, we need to track the installed FILE_SET names and their
possible install destinations.

At generation time we resolve the names and destinations concretely. If
a FILE_SET wasn't provided or isn't an INTERFACE, we silently bail out.

Fixes: #26697
2025-06-12 16:58:11 -04:00
Brad King 7dba72f9d1 Merge topic 'suppress-implicit-find-events'
c42d82d569 find_*: support suppressing implicit transition events
64f429cc4f Help/dev: add release note for implicit configure log find events
4cd83339f1 cmFindCommon: fix comment after renaming the `FullDebugMode` member

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10874
2025-06-12 09:49:16 -04:00
Kitware Robot 2cecabf730 CMake Nightly Date Stamp 2025-06-12 00:04:37 -04:00
Ben Boeckel c42d82d569 find_*: support suppressing implicit transition events
When projects explicitly unset variables, the transition detection can
end up reporting events when they are not desired.

See: #24833
2025-06-11 20:09:32 +02:00
Ben Boeckel 4cd83339f1 cmFindCommon: fix comment after renaming the FullDebugMode member 2025-06-11 20:07:34 +02:00
Brad King feba34c68a Merge topic 'link-flags'
d592558b8b cmLocalGenerator: Drop no-op link flag placeholder infrastructure
67639002ad Ninja,Makefile: Drop now-unused placeholders from link rule variables
951e4d3f62 Ninja,Makefile: Move builtin linker flags to <LINK_FLAGS> placeholder
6b618c6079 cmLocalGenerator: Clarify MODULE link flags placeholder population
c52a654aa1 cmLocalGenerator: Improve formatting of rule placeholder variable list
37cf9941ed UseEcos: Add missing placeholder in rules to link executables
fa61be5bc4 Embarcadero,OpenWatcom: Clear unused flags for creating shared libraries
124e40947c CMakeCommonLanguageInclude: Do not unset MODULE library flags when empty
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10869
2025-06-11 10:28:07 -04:00
Brad King b59925a842 Merge topic 'xcode-build-workspace'
844d79916a cmake --build: Add support for driving Xcode workspaces

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10855
2025-06-11 10:26:54 -04:00
Brad King 03af61eecb Merge topic 'fix-Wformat'
94930c47e4 cmSystemTools: Fix -Wformat warning in EncodeURL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10870
2025-06-11 10:10:44 -04:00
Brad King 92d13b9117 Merge topic 'always-set-project-COMPAT_VERSION'
04dadd0138 Tests: Ensure project() clears unspecified properties
6171e2da90 project: Always set COMPAT_VERSION variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10871
2025-06-11 10:09:15 -04:00
Brad King afed566a0a Merge topic 'find-events-without-debugging'
0e53a67a7b cmFindPackage: fix over-reporting
8b3fc9578a cmFindPackageCommand: report found files to debugging infra
ee062ce4d0 cmFindCommon: test implicit configure log event reporting
a90598f17c cmFindCommon: support suppressing implicit event logging
5aefc8b7b8 cmFindBase: let the debug state know if it has already been found
928a74f684 cmFindCommon: always track configure log information
4fa647a544 Tests: Match RunCMake.try_{compile,run} configure log more precisely

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10783
2025-06-11 09:56:50 -04:00
Kitware Robot bbaa25bca7 CMake Nightly Date Stamp 2025-06-11 00:04:46 -04:00
Brad King d592558b8b cmLocalGenerator: Drop no-op link flag placeholder infrastructure
Revert infrastructure from commit 8bcf9c7a3e (Add support of "LINKER:"
prefix for artifact creation flags, 2024-10-12, v4.0.0-rc1~522^2~1).
It is not needed to populate legacy placeholders with empty strings.
2025-06-10 14:44:57 -04:00
Brad King 951e4d3f62 Ninja,Makefile: Move builtin linker flags to <LINK_FLAGS> placeholder
Previously we used separate placeholders for builtin linker flags:

* CMAKE_<LANG>_LINK_FLAGS for EXECUTABLEs
* CMAKE_SHARED_LIBRARY_CREATE_<LANG>_FLAGS for SHARED libraries
* CMAKE_SHARED_MODULE_CREATE_<LANG>_FLAGS for MODULE libraries

These correspond to variables set by our compiler information modules.
Teach the generators to look up these variables and add them to the
existing `<LINK_FLAGS>` placeholder instead.  Substitute the empty
string for the old placeholders.

Issue: #21934
2025-06-10 14:41:58 -04:00
Matthew Woehlke 6171e2da90 project: Always set COMPAT_VERSION variables
Modify the project command to always set COMPAT_VERSION variables, not
just if experimental CPS export support is enabled. This ensures that
these values are (at least as of the call to the project command) empty
and cannot be "preset" e.g. by command line arguments in the case that
experimental support is enabled after the project command is called.
2025-06-10 14:27:16 -04:00
Ben Boeckel 0e53a67a7b cmFindPackage: fix over-reporting
Both track when a `_DIR` variable is already defined and suppress
implicit event reporting when a mode that has no reliable method for
such detection.
2025-06-10 20:01:12 +02:00
Stepanov Igor 844d79916a cmake --build: Add support for driving Xcode workspaces
External tools may create a `.xcworkspace` directory next to the
`.xcodeproj` directory that CMake generates.  If a workspace exists,
drive the build through it instead.

Closes: #26958
Co-authored-by: Brad King <brad.king@kitware.com>
2025-06-10 11:08:04 -04:00
Brad King 94930c47e4 cmSystemTools: Fix -Wformat warning in EncodeURL 2025-06-10 10:21:20 -04:00
Brad King ba8399692c Merge topic 'fix-ninja-dependinfo-location'
a16566105b cmNinjaTargetGenerator: fix DependInfo.json generation location

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10868
2025-06-10 09:51:34 -04:00
Brad King ee698a7db4 Merge topic 'update-kwsys'
79f30a8fc3 Merge branch 'upstream-KWSys' into update-kwsys
626f3d43f0 KWSys 2025-06-10 (d780326e)
575106995b Source: Drop support for KWSys Encoding without std::wstring methods

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10866
2025-06-10 09:50:44 -04:00
Brad King ed8513783c Merge topic 'instrumentation-fix'
e01d12c14f instrumentation: Prevent unnecessary query loading
f26f127183 instrumentation: Reuse single cmsys::SystemInformation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10863
2025-06-10 09:48:17 -04:00
Brad King 79f30a8fc3 Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2025-06-10 (d780326e)
2025-06-10 09:44:40 -04:00
Brad King 6b618c6079 cmLocalGenerator: Clarify MODULE link flags placeholder population
Clarify comments from commit 8bcf9c7a3e (Add support of "LINKER:" prefix
for artifact creation flags, 2024-10-12, v4.0.0-rc1~522^2~1) about
MODULE library creation flags.  Also avoid falling back to EXECUTABLE
flag placeholders for SHARED or MODULE libraries.  I don't think we
ever populate `CMAKE_<LANG>_CREATE_SHARED_{LIBRARY,MODULE}` from the
value of `CMAKE_<LANG>_LINK_EXECUTALBE`.
2025-06-10 08:53:47 -04:00
Brad King c52a654aa1 cmLocalGenerator: Improve formatting of rule placeholder variable list
Add a trailing comma so `clang-format` does not try to consolidate
lines.  Also move it to an anonymous namespace.
2025-06-10 08:53:47 -04:00
Kitware Robot 828fa0f193 CMake Nightly Date Stamp 2025-06-10 00:04:46 -04:00
Ben Boeckel a16566105b cmNinjaTargetGenerator: fix DependInfo.json generation location
Commit aafd771529 (cmNinjaTargetGenerator: use `GetObjectFileDir` where
possible, 2025-05-21) from !10812 accidentally converted the
`GetTargetDependInfoPath` from an always-absolute path to a
relative-for-ninja path. This works fine as everything ended up doing
`ConvertToNinjaPath` as necessary *except* the code which actually wrote
the file. That needs an absolute path in order to generate it in the
correct location.

Fixes: #26983
2025-06-09 21:58:32 +02:00
Ben Boeckel 8b3fc9578a cmFindPackageCommand: report found files to debugging infra 2025-06-09 12:24:32 -04:00
Ben Boeckel a90598f17c cmFindCommon: support suppressing implicit event logging
`find_package` has different behavior where not all modes support
reliably knowing if a search has already happened in order to not always
report failing searches.
2025-06-09 12:24:32 -04:00
Ben Boeckel 5aefc8b7b8 cmFindBase: let the debug state know if it has already been found
This avoids reporting a "not found" state for searches that had cached
results.
2025-06-09 12:24:31 -04:00
Ben Boeckel 928a74f684 cmFindCommon: always track configure log information
This does mean that debug state is always around, so instead gate the
non-configure log information behind a dedicated variable.
2025-06-09 12:24:31 -04:00
Martin Duffy e01d12c14f instrumentation: Prevent unnecessary query loading
Don't load queries from instrumentation directories when GetIsInTryCompile
or before ClearGeneratedQueries from previous configures has run.
2025-06-09 11:33:24 -04:00
Martin Duffy f26f127183 instrumentation: Reuse single cmsys::SystemInformation 2025-06-09 11:33:18 -04:00
Brad King 575106995b Source: Drop support for KWSys Encoding without std::wstring methods 2025-06-09 09:50:26 -04:00
Brad King 72f4659697 Merge topic 'xcode-library-link-flags'
a2414480e8 cmGlobalXCodeGenerator: Remove unused argument from LookupFlags helper
35317a7ae2 Xcode: De-duplicate -dynamiclib/-bundle flags for SHARED/MODULE libraries
5fdd4a5859 cmGlobalXCodeGenerator: Convert GetTargetProductType signature to string_view
ced6b31c48 cmGlobalXCodeGenerator: Convert CreateString signature to string_view

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10862
2025-06-09 09:26:01 -04:00
Kitware Robot 5ecd2acf75 CMake Nightly Date Stamp 2025-06-09 00:04:54 -04:00
Kitware Robot 5b7c38550b CMake Nightly Date Stamp 2025-06-08 00:11:01 -04:00
Brad King a2414480e8 cmGlobalXCodeGenerator: Remove unused argument from LookupFlags helper 2025-06-07 06:43:08 -04:00