1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-23 00:48:55 +08:00
Commit Graph

2513 Commits

Author SHA1 Message Date
Brad King
bd176b430c Renumber post-3.31 development from 3.32 to 4.0
Issue: #26613
2025-01-16 09:18:21 -05:00
Brad King
1d5c1b0023 Merge topic 'policy-cleanup'
b010a1fb1d Help: Update try_compile list of automatic policies
5e9b40b6a5 Help: Update cmake-buildsystem(7) TARGET_POLICY example to a newer policy
9ffbc0e628 Tests/RunCMake/cmake_minimum_required: Generalize deprecated version case name
0eca249ac7 Tests/RunCMake: Update more cmake_minimum_required versions to 3.10
a8cf033a74 Tests/RunCMake/return: Use newer cmake_minimum_required VERSION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10178
2025-01-16 09:01:48 -05:00
Brad King
e87c6c6259 Merge topic 'execute-process-error'
3ece058d97 execute_process: Allow setting default COMMAND_ERROR_IS_FATAL value
85035dd954 Help/command/execute_process: Fix definition list formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10169
2025-01-16 08:59:00 -05:00
Brad King
8018f2a6c4 Merge topic 'instrumentation'
097d4fd1b5 instrumentation: Collect and record project build system metrics
8a3c195188 Tests/RunCMake: Add RunCMake_CHECK_ONLY Option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9791
2025-01-16 08:55:25 -05:00
Brad King
5e9b40b6a5 Help: Update cmake-buildsystem(7) TARGET_POLICY example to a newer policy 2025-01-15 11:21:21 -05:00
Martin Duffy
3ece058d97 execute_process: Allow setting default COMMAND_ERROR_IS_FATAL value
Issue: #26576
2025-01-15 11:12:34 -05:00
Martin Duffy
097d4fd1b5 instrumentation: Collect and record project build system metrics
Add a feature for collecting build instrumentation for CMake projects.

Issue: #26099
2025-01-15 09:16:50 -05:00
Brad King
72e27a4856 Merge topic 'fix-typos-found-by-pre-commit-hooks'
d620d77d26 FindDoxygen: Rename `_Doxygen_dne_header` -> `_Doxygen_do_not_edit_header`
e7ff3cccea PushToAndroidDevice.cmake: Rename `cmake_parse_arguments` prefix
bc8621d999 Fix: A lot of typos in code found by `typos`
b33beb7af5 Help: Fix some typos found by `sphinx-lint`
78e45c2db6 Style: Replace TABs with spaces for indentation in some files
74e0173f66 Tests(NuGet): Fix the test to ignore empty and space-only lines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10151
2025-01-14 09:44:34 -05:00
Brad King
74c462b4f8 Merge topic 'xcode-scheme-test-config'
7d28005244 Xcode: Support for test action 'Build Configuration' scheme property
1f4e1ccbc8 Help: Move launch config scheme property to the correct section
8aaae0f643 vim: Remove duplicated keywords from cmake.vim

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10154
2025-01-13 11:37:31 -05:00
Brad King
6a800f666f Merge topic 'CMAKE_LANG_LINK_MODE-variable-creation'
00932ea864 Introduce CMAKE_<LANG>_LINK_MODE variable.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !10162
2025-01-13 11:23:32 -05:00
Brad King
eb616ed6fd Merge topic 'fix-Fortran_BUILDING_INTRINSIC_MODULES'
b65930a7a7 Fortran: Add Fortran_BUILDING_INTRINSIC_MODULES for building intrinsics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10158
2025-01-13 11:22:05 -05:00
Alex Turbov
bc8621d999 Fix: A lot of typos in code found by typos
Yet another great code spellchecker: https://github.com/crate-ci/typos/

(Will be added later as a `pre-commit` hook)
2025-01-12 18:49:34 +04:00
Alex Turbov
b33beb7af5 Help: Fix some typos found by sphinx-lint
Particularly,

- Avoid TABs in RST docs.
- Avoid words ending w/ hyphen at the right side of pharagraphs.
2025-01-12 18:49:34 +04:00
Brad King
675518ea81 Merge topic 'revert-genex-tco-subgraph'
a6b84a438f GenEx: Revert "Limit TARGET_PROPERTY transitive closure optimization"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10156
2025-01-10 09:21:04 -05:00
Marc Chevrier
00932ea864 Introduce CMAKE_<LANG>_LINK_MODE variable.
This variable define how the link step is done. Possible values are:
* DRIVER: the compiler is used as driver for the link step
* LINKER: the linker is used directly for the link step.
2025-01-10 13:24:16 +01:00
Alex Turbov
b65930a7a7 Fortran: Add Fortran_BUILDING_INTRINSIC_MODULES for building intrinsics
In commit fe3f846e1b (Makefiles: Add support for building Fortran
intrinsics, 2020-11-19, v3.22.0-rc1~565^2) the property was added with
incorrect spelling `Fortran_BUILDING_INSTRINSIC_MODULES`.  Add a new
property with the correct spelling.  Keep the old one for compatibility.

Issue: #21463
2025-01-09 15:30:00 -05:00
Brad King
a6b84a438f GenEx: Revert "Limit TARGET_PROPERTY transitive closure optimization"
Revert commit 4a11772618 (GenEx: Limit TARGET_PROPERTY transitive
closure optimization to subgraphs, 2024-05-31, v3.31.0-rc1~114^2).
The change caused substantial performance regressions in some
existing use cases.  Revert it pending further investigation.

Issue: #25728
Fixes: #26457
2025-01-09 11:56:20 -05:00
Cristiano Carvalheiro
7d28005244 Xcode: Support for test action 'Build Configuration' scheme property
Also allow scoped property checking on Xcode scheme tests to
 be able to distinguish between launch and test actions build config.
2025-01-09 16:36:33 +00:00
Peter Kokot
1a8e43d57d FindPackageHandleStandardArgs: Clarify the FOUND_VAR option
The `find_package_handle_standard_args(FOUND_VAR)` is deprecated as of
CMake 3.3 and both the `<PackageName>_FOUND` and the upper-cased
`<PACKAGE_NAME>_FOUND` are set with or without using this option.
Additionally, find modules and docs are also synced with this to make it
clearer.
2024-12-31 02:07:16 +01: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
2264356ebf Merge topic 'doc-buildsystem-binary-targets'
be0b837e2b Help: Fix cmake-buildsystem(7) internal link

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10105
2024-12-17 10:44:37 -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
Brad King
be0b837e2b Help: Fix cmake-buildsystem(7) internal link
Fix a broken link from commit 987f3fa4e0 (Help: Add cmake-buildsystem(7)
subsections for each binary target type, 2024-12-12).
2024-12-17 10:08:33 -05:00
Brad King
546be3530a Merge topic 'xcode-scheme-lldb-init-file'
419cfe30d0 Xcode: Support for 'LLDB Init File' scheme property
65ad1bbd4c vim: Remove duplicated keywords from cmake.vim
a96d6a98d3 Tests/RunCMake/XcodeProject: Improve XcodeSchemaProperty failure messages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10093
2024-12-16 09:08:56 -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
Brad King
987f3fa4e0 Help: Add cmake-buildsystem(7) subsections for each binary target type
Re-organize the "Binary Targets" section of the manual to have a
dedicated subsection for each kind of binary target.  Initialize each
subsection by documenting the object file and link semantics of the
corresponding target type.
2024-12-13 09:53:26 -05:00
Cristiano Carvalheiro
419cfe30d0 Xcode: Support for 'LLDB Init File' scheme property
Fixes: #24002
2024-12-13 08:31:11 -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
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
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
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
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
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
908b2ca27c Merge topic 'doc-find-root-dir'
b431306f22 Help: Clarify the Xxx_ROOT_DIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !10006
2024-11-19 10:20:40 -05:00
Brad King
1224fbce3f Help: Document CLICOLOR and CLICOLOR_FORCE environment variables
Issue: #26451
2024-11-18 13:00:22 -05:00
Peter Kokot
b431306f22 Help: Clarify the Xxx_ROOT_DIR
The Xxx_ROOT_DIR is optional result variable set by find module when
package is found. It is the base directory of the Xxx installation. The
`Xxx_ROOT` is a hint variable set by the user where to look for the
`Xxx` package.
2024-11-16 21:51:43 +01:00
Peter Kokot
c2f4183399 Help: Change PATHS to HINTS for pkg-config
When pkg-config is available and package is found with it, HINTS are a
better place where to hint the PC_Foo_* variables than PATHS. HINTS are
looked before the system default paths and those listed in PATHS.
2024-11-14 20:28:36 +01:00
Brad King
1e0cd39460 Merge topic 'link-warning-as-error'
7907c83175 Link step: Add LINK_WARNING_AS_ERROR target property
656267c871 COMPILE_WARNING_AS_ERROR: rename methods to prepare link similar functionality

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9984
2024-11-13 09:24:36 -05:00
Brad King
b14df1b4bb Merge topic 'FindSQLite3-pkg-config'
2d228201fc Help: Guard calls to pkg_check_modules in cmake-developer(7) example
674a987898 FindSQLite3: Guard calls to pkg_check_modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9983
2024-11-12 10:16:48 -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
Peter Kokot
2d228201fc Help: Guard calls to pkg_check_modules in cmake-developer(7) example
This was missed in commit 25b947589a (Modules: Guard calls to
pkg_check_modules, 2024-08-07, v3.31.0-rc1~236^2).
2024-11-11 10:53:22 -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
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
0ba8bdb5c2 Merge topic 'doc-BUILD_TESTING'
9510820d58 Help: Document CTest module BUILD_TESTING variable
6e6e688b80 CTest: Improve formatting of documentation cmake code blocks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9927
2024-10-25 08:23:25 -04:00
Robert Maynard
9510820d58 Help: Document CTest module BUILD_TESTING variable
The `BUILD_TESTING` variable is referenced in `add_test` and
`enable_testing`.  It should be documented as it controls the
behavior tests working when projects use `include(CTest)`.
2024-10-24 11:46:37 -04:00