Commit Graph

3576 Commits

Author SHA1 Message Date
Brad King
c8c1c9beb8 Merge branch 'release-3.31' 2024-12-19 10:50:21 -05:00
Brad King
41abd532b6 CMake 3.31.3 2024-12-19 10:18:19 -05:00
Brad King
5c7bb0bfd9 Merge topic 'rename-cmakelists'
fcbc883fa3 cmake: Allow configuration of default script names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !10059
2024-12-18 08:49:58 -05:00
Martin Duffy
fcbc883fa3 cmake: Allow configuration of default script names
Adds the ``--project-file`` command-line option to modify the default script
name loaded by CMake and ``add_subdirectory`` to values other than
``CMakeLists.txt``.

Fixes: #21570
2024-12-17 12:47:02 -05:00
Brad King
e483d7fb57 Merge topic 'ctest-invalid-arg'
30dded462a Help: Add 3.30 release note for error on unknown arguments to ctest

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10106
2024-12-17 10:54:55 -05:00
Brad King
f27ba9768b Merge topic 'ctest-invalid-arg' into release-3.31
30dded462a Help: Add 3.30 release note for error on unknown arguments to ctest

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10106
2024-12-17 10:54:53 -05:00
Brad King
30dded462a Help: Add 3.30 release note for error on unknown arguments to ctest
This was left out of commit 304396d13c (ctest: Show error on invalid
ctest arguments, 2024-04-03, v3.30.0-rc1~286^2).

Fixes: #26539
2024-12-17 10:32:05 -05:00
Brad King
6f3ec4a341 Merge topic 'GenEx-PATH-NATIVE_PATH'
427be46424 GenEx $<PATH>: Add NATIVE_PATH sub-command.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10087
2024-12-17 10:13:16 -05:00
Timothy Finnegan
427be46424 GenEx $<PATH>: Add NATIVE_PATH sub-command.
Implements the generator expression $<PATH:MATIVE_PATH> which convert
path(s) into a native format with platform-specific slashes (``\`` on
Windows hosts and ``/`` elsewhere).

Fixes: #26515
2024-12-14 11:16:47 +01:00
Cristiano Carvalheiro
419cfe30d0 Xcode: Support for 'LLDB Init File' scheme property
Fixes: #24002
2024-12-13 08:31:11 -05:00
Brad King
85f4fdc000 Merge topic 'debugger-working-directory'
0a9fb88121 fileapi: Report DEBUGGER_WORKING_DIRECTORY in codemodel-v2 target objects
9ed178f9d8 Add generator-agnostic DEBUGGER_WORKING_DIRECTORY target property
200efab4d4 Tests/RunCMake/FileAPI: Improve error on unexpected line numbers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10075
2024-12-11 09:47:03 -05:00
Garrett Campbell
0a9fb88121 fileapi: Report DEBUGGER_WORKING_DIRECTORY in codemodel-v2 target objects
Closes: #16478
2024-12-10 09:04:31 -05:00
Evan Wilde
e1d635e71c Swift: Expand generator expressions in Swift_MODULE_DIRECTORY
This patch makes the `Swift_MODULE_DIRECTORY` property behave more like
the other output directory properties, allowing generator expressions
and fixing the behavior with multi-config generators.

Issue: #26010
2024-12-09 10:37:05 -08:00
Garrett Campbell
9ed178f9d8 Add generator-agnostic DEBUGGER_WORKING_DIRECTORY target property
Generalize the `VS_DEBUGGER_WORKING_DIRECTORY` property.

Issue: #16478
2024-12-09 10:47:10 -05:00
Brad King
bed97ced45 Merge branch 'release-3.31' 2024-12-05 09:12:51 -05:00
Brad King
793c5f11f6 CMake 3.31.2 2024-12-05 08:42:47 -05:00
Brad King
14ed8464c8 Merge topic 'ARCHIVER-prefix'
a4ff2b01e3 IntelLLVM-Windows: add definitions for ARCHIVER: prefix
521a6d409c Archive library: Add support for ARCHIVER: prefix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10038
2024-11-28 09:22:38 -05:00
Brad King
8a0ebc29da Merge topic 'FeatureSummary-condition-syntax'
6a7d5e414d FeatureSummary: Introduce policy CMP0183 for full Condition Syntax

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10031
2024-11-27 09:08:29 -05:00
Marc Chevrier
521a6d409c Archive library: Add support for ARCHIVER: prefix
Add the support of the ARCHIVER: prefix to offer a portable way to pass
options to the archiver when the compiler is used as driver.
2024-11-26 19:26:07 +01:00
Peter Kokot
6a7d5e414d FeatureSummary: Introduce policy CMP0183 for full Condition Syntax
Closes: #26468
2024-11-26 13:19:25 -05:00
SunBlack
7e2aee4458 FindGDAL: Document as deprecated in favor of upstream CMake package
Issue: #26471
2024-11-26 13:13:20 -05:00
Brad King
508817037d Merge topic 'aix-archive-shared-libraries'
2c22aae14b Tests/RunCMake: Enable CMP0182 in test cases on AIX
5c78623143 AIX: Enable shared library archives by default
7a05e8e994 Help: Reword AIX_SHARED_LIBRARY_ARCHIVE to avoid assuming a default
655a245d60 Tests: Explicitly disable AIX_SHARED_LIBRARY_ARCHIVE in some cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10030
2024-11-25 10:07:20 -05:00
Brad King
5c78623143 AIX: Enable shared library archives by default
This is the preferred convention for shared libraries on AIX.
Add policy CMP0182 to provide compatibility.

Closes: #26372
2024-11-23 15:23:25 -05:00
Brad King
1412bfbf58 Merge topic 'vs-solution-items'
0bb13ba0e6 VS: Add support for Visual Studio solution items
f1bcb7276a VS: Refactor solution folder creation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10003
2024-11-23 15:13:59 -05:00
Lauri Vasama
0bb13ba0e6 VS: Add support for Visual Studio solution items
Files listed in the `VS_SOLUTION_ITEMS` directory property of a project
directory are added as solution items in the 'Solution Items' solution
directory.

If `source_group` is applied to the files listed in `VS_SOLUTION_ITEMS`,
solution groups matching the names of the source groups are created
outside of the default 'Solution Items' group.  If not items are placed
into the default group, it is not created.

Solution items added to subprojects are not included in the top-level
project.

Closes: #26409
2024-11-22 09:12:19 -05:00
Brad King
8a2e9f152a Merge branch 'release-3.31' 2024-11-21 11:56:45 -05:00
Brad King
eb281d3454 CMake 3.31.1 2024-11-21 11:15:52 -05:00
Brad King
4b9fad4555 Merge branch 'release-3.30' 2024-11-21 10:06:02 -05:00
Brad King
0576d076b1 Merge branch 'release-3.30' into release-3.31 2024-11-21 09:54:18 -05:00
Brad King
817707b904 CMake 3.30.6 2024-11-21 09:18:01 -05:00
Brad King
2d5938dc5c Merge branch 'release-3.29' 2024-11-21 09:12:20 -05:00
Brad King
0349079e35 Merge branch 'release-3.30' into release-3.31 2024-11-21 09:12:04 -05:00
Brad King
66817bd07d Merge branch 'release-3.29' into release-3.30 2024-11-21 09:11:40 -05:00
Brad King
b47368e425 CMake 3.29.9 2024-11-21 08:34:26 -05:00
Brad King
1bdaad7573 ExternalProject: Optionally integrate 'make' job server with INSTALL_COMMAND
Add an `INSTALL_JOB_SERVER_AWARE` option to `ExternalProject_Add`.
When using an explicit `INSTALL_COMMAND`, the generated commands
won't use `$(MAKE)` thus failing to connect to the outer make's
job server.  Add an option enable explicit job server integration.

This is the install step's equivalent to the build step's
`BUILD_JOB_SERVER_AWARE` option added by commit bc43398e72
(ExternalProject: Enable Make Job Server with Explicit Build Command,
2023-08-09, v3.28.0-rc1~217^2).  It is useful when the external
project's installation is driven by its build system.  Note that with
Makefile generators, our default install command does use `$(MAKE)` to
connect to the outer make's job server.

Issue: #26398
2024-11-19 10:22:24 -05:00
Marc Chevrier
7907c83175 Link step: Add LINK_WARNING_AS_ERROR target property
Add a way to specify, in a portable way, to raise an error for any
warning during the link step. For that purpose, define:
* CMAKE_LINK_WARNING_AS_ERROR variable
* LINK_WARNING_AS_ERROR target property

Fixes: #25343
2024-11-12 15:11:53 +01:00
Brad King
b89610b5fa Merge topic 'apple-compiler-selection'
7b19531291 macOS: Do not pass any SDK/-isysroot to compilers by default
3b8b70fe72 macOS: Simplify logic converting CMAKE_OSX_SYSROOT to a path
c55c113076 macOS: Revert finding tools inside Xcode that are not in the PATH
77fcee9204 macOS: Revert "Resolve compiler in /usr/bin to that reported by Xcode xcrun"
9eb530842c Tests/RunCMake/CMakePresets: Do not forward empty CMAKE_MAKE_PROGRAM
7fb14e707d Tests/RunCMake/XcFramework: Use macosx SDK in all multi-arch macOS cases
70ff1f15fc Tests/CTestTest*: Detect compiler from environment
1faf60cffc Tests/FortranC: Handle empty CMAKE_OSX_SYSROOT
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Acked-by: FX Coudert <fxcoudert@gmail.com>
Merge-request: !9977
2024-11-08 11:50:31 -05:00
Brad King
8353e6ab8d Merge topic 'vs-custom-command-disable-parallel-build'
4ee8705b12 VS: add source property VS_CUSTOM_COMMAND_DISABLE_PARALLEL_BUILD

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9958
2024-11-07 10:07:03 -05:00
Brad King
7b19531291 macOS: Do not pass any SDK/-isysroot to compilers by default
On modern macOS, compiler wrappers like `/usr/bin/cc` automatically
choose a SDK to pass via `-isysroot` to an underlying compiler from
Xcode or the CommandLineTools.  Other toolchains like Homebrew's `gcc-*`
come with a default SDK too.  Therefore, when targeting macOS, we no
longer need to choose any SDK or pass an `-isysroot` flag by default.

Update initialization of `CMAKE_OSX_SYSROOT` to be empty by default when
targeting macOS.

Fixes: #19180
2024-11-07 09:46:10 -05:00
Brad King
77fcee9204 macOS: Revert "Resolve compiler in /usr/bin to that reported by Xcode xcrun"
Revert commit 1f085e11e4 (OS X: Resolve compiler in /usr/bin to that
reported by Xcode xcrun, 2015-01-03, v3.2.0-rc1~126^2~1).  The compilers
in Xcode cannot be used by build systems that do not add an `-isysroot`
flag.

Issue: #19180
2024-11-07 09:46:09 -05:00
Darragh Coy
4ee8705b12 VS: add source property VS_CUSTOM_COMMAND_DISABLE_PARALLEL_BUILD
This boolean setting allows parallel building to be disabled for
individual source files built via `add_custom_command`. Using this
option is equivalent to setting policy `CMP0147` to the `OLD` behavior.

Closes: #26413
2024-11-06 13:29:57 -05:00
Marc Chevrier
35350c419d Add support of "LINKER:" prefix for CMAKE_<TYPE>_LINKER_FLAGS variable
The following variables now support the LINKER: prefix:
* CMAKE_<TYPE>_LINKER_FLAGS
* CMAKE_<TYPE>_LINKER_FLAGS_<CONFIG>

Fixes: #26171
2024-11-04 17:07:58 +01:00
Dylan Snelgrove
0a4ee422c1 ctest: Restore Windows Error Reporting in interactive mode
This behavior was removed when we switched to libuv in CMake 3.11.
After backporting new changes from libuv v2, we can restore the
behavior.

Fixes: #20115
2024-11-01 09:56:54 -04:00
Brad King
c9f320fdc6 Merge topic 'doc-CMP0174'
6aa2e22300 Help: Add 3.31 release note for cmake_parse_arguments CMP0174

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9955
2024-10-29 09:39:25 -04:00
Peter Kokot
6aa2e22300 Help: Add 3.31 release note for cmake_parse_arguments CMP0174
This was left out by commit ceeea4e511 (cmake_parse_arguments: Set
variable if empty string given after keyword, 2024-08-18,
v3.31.0-rc1~175^2).
2024-10-28 09:51:27 -04:00
Brad King
36f6fa8737 Merge topic 'doc-rel-3.31'
315a8f88cc Help: Add 3.31 release note for file(MAKE_DIRECTORY)'s RESULT option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9904
2024-10-15 13:57:27 -04:00
Brad King
98ccd8800a Merge topic 'doc-rel-3.31' into release-3.31
315a8f88cc Help: Add 3.31 release note for file(MAKE_DIRECTORY)'s RESULT option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9904
2024-10-15 13:57:26 -04:00
Brad King
0eb871b856 Merge topic 'doc-rel-3.29'
0e81c12483 Help: Add 3.29 release note for try_compile LINKER_LANGUAGE option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9905
2024-10-15 13:54:55 -04:00
Brad King
c7e27f02e8 Merge topic 'doc-rel-3.29' into release-3.31
0e81c12483 Help: Add 3.29 release note for try_compile LINKER_LANGUAGE option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9905
2024-10-15 13:54:54 -04:00
Brad King
e3ebf4f5c0 Merge topic 'doc-rel-3.29' into release-3.30
0e81c12483 Help: Add 3.29 release note for try_compile LINKER_LANGUAGE option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9905
2024-10-15 13:34:08 -04:00