Commit Graph

71007 Commits

Author SHA1 Message Date
Ben Boeckel
b634998727 Help: add and make references to generators consistent 2025-06-12 21:25:24 +02:00
Brad King
b44bc8d1a5 Merge branch 'release-4.0' 2025-06-11 11:57:15 -04:00
Brad King
ae54b556ed Merge branch 'release-3.31' 2025-06-11 11:57:09 -04:00
Brad King
00cb41c2b2 Merge branch 'release-3.30' 2025-06-11 11:56:47 -04:00
Brad King
aa221870c7 Merge branch 'release-3.31' into release-4.0 2025-06-11 11:56:25 -04:00
Brad King
a26c23a7e0 Merge branch 'release-3.30' into release-3.31 2025-06-11 11:56:14 -04:00
Brad King
50aa13cc5a CMake 3.30.9 v3.30.9 2025-06-11 10:46:07 -04: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
Matthew Woehlke
04dadd0138 Tests: Ensure project() clears unspecified properties
Add a unit test to ensure that various project-related variables are set
to empty when values are not provided in the project() call.
2025-06-10 15:07:29 -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
67639002ad Ninja,Makefile: Drop now-unused placeholders from link rule variables
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 are now always replaced by the empty string, so drop them
from our rule variables.
2025-06-10 14:43:15 -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
7d5831424b Merge topic 'ctest-show-only-json-schema'
2e7bca5f05 ctest: Add JSON schema for --show-only=json-v1 output
fe1cd4e157 Help: Make docs for ctest --show-only=json-v1 reflect the implementation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10865
2025-06-10 10:00:58 -04:00
Brad King
929c66c068 Merge topic 'update_nvhpc_visibility_and_pie_flags'
ea6b29a367 NVHPC: Add support for 25.07 no-pie option
8ef90ffc52 NVHPC: Add support for COMPILE_OPTIONS_VISIBILITY

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10867
2025-06-10 09:57:03 -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
55902816a8 Merge branch 'release-4.0' 2025-06-10 09:48:18 -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
bfd01bf2ef Merge topic 'instrumentation-fix' into release-4.0
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:15 -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
KWSys Upstream
626f3d43f0 KWSys 2025-06-10 (d780326e)
Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit d780326e2bd8c57eaca712f87552e841aa80b415 (master).

Upstream Shortlog
-----------------

Brad King (1):
      3f589f94 Encoding: Drop support for building without std::wstring
2025-06-10 09:44:39 -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
Brad King
37cf9941ed UseEcos: Add missing placeholder in rules to link executables 2025-06-10 08:53:47 -04:00
Brad King
fa61be5bc4 Embarcadero,OpenWatcom: Clear unused flags for creating shared libraries
Clear `CMAKE_SHARED_LIBRARY_CREATE_<LANG>_FLAGS` since no special
link flags are needed to create a DLL with these toolchains.
Our shared library creation rules do not reference the placeholder,
so this variable was never used.  However, we may soon teach the
generators to look it up directly.
2025-06-10 08:53:47 -04:00
Brad King
124e40947c CMakeCommonLanguageInclude: Do not unset MODULE library flags when empty 2025-06-10 08:53:47 -04:00
Kitware Robot
828fa0f193 CMake Nightly Date Stamp 2025-06-10 00:04:46 -04:00
Craig Scott
2e7bca5f05 ctest: Add JSON schema for --show-only=json-v1 output
Add schema validation to the existing test case for --show-only=json-v1 too.

Fixes: #26980
2025-06-10 07:12:31 +10:00
Brad King
7b4c87edae ADSP: Do not pass executable link flags when creating a static library
This was done by mistake in commit d090159318 (ENH: add support for the
ADSP toolchains for Blackfin, Shark and TigerShark DSPs, patch from
Raphael Cotty, 2007-07-12, v2.6.0~1446), and preserved in the
generalization by commit e9eabb0dcd (ADSP: Configure compiler in
compiler module, 2022-03-24, v3.24.0-rc1~331^2~1).  Fix both places.
2025-06-09 16:08:33 -04:00
Brad King
58a70cfc38 Swift: Drop unused placeholder in shared library link rule
The `CMAKE_SHARED_LIBRARY_<LANG>_FLAGS` placeholder is meant for flags
used to compile sources meant for a shared library.  It is used for
C/CXX to add PIC flags.  It is not documented for public use, and we do
not populate it for Swift anyway.
2025-06-09 16:04:10 -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
Brad King
0165b3fa62 CrayPrgEnv: Drop unused static library "link" flags variable
In commit c54a621b55 (Cray: New platform file for Cray Linux Environment
and PrgEnv, 2015-11-13, v3.5.0-rc1~216^2~1) we populated variable
`CMAKE_STATIC_LIBRARY_LINK_<LANG>_FLAGS`, but we never reference it, and
the generators do not use it.  Static libraries are archives, and are
not produced by a linker.
2025-06-09 15:53:04 -04:00
Brad King
2f177e61d5 GNU: Remove non-functional code in OBJCXX support
In commit 9e66397c28 (Languages: Add support for Objective-C++,
2019-09-13, v3.16.0-rc1~44^2~2) we set `CMAKE_OBCXX_LINK_FLAGS`.
It was a typo for `CMAKE_OBJCXX_LINK_FLAGS`, and so has not had
any effect.
2025-06-09 15:28:29 -04:00
Robert Maynard
ea6b29a367 NVHPC: Add support for 25.07 no-pie option 2025-06-09 14:36:07 -04:00
Ben Boeckel
8b3fc9578a cmFindPackageCommand: report found files to debugging infra 2025-06-09 12:24:32 -04:00
Ben Boeckel
ee062ce4d0 cmFindCommon: test implicit configure log event reporting 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
Brad King
4fa647a544 Tests: Match RunCMake.try_{compile,run} configure log more precisely 2025-06-09 12:18:22 -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