Commit Graph

36672 Commits

Author SHA1 Message Date
Kitware Robot
56853fd896 CMake Nightly Date Stamp 2024-12-19 00:08:19 -05:00
Brad King
1f3eb6c4d4 ci: update copyright year as part of CMake Nightly Date Stamp
Extend commit 0f82d07266 (ci: add job to update CMake Nightly Date
Stamp, 2024-12-17) to update the year range in `Copyright.txt` on
January 1 so we don't have to update it manually once per year.
Our `CMake.Copyright` test verifies that these match.
2024-12-18 09:04:14 -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
Kitware Robot
3bc9d37163 CMake Nightly Date Stamp 2024-12-18 00:06:59 -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
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
135e6feba9 Merge topic 'find-cps'
d00201afd6 Tests: Add tests for CPS find_package
65429611b9 find_package: Fix handling of relative paths in CPS
5236984a08 Help: Describe CPS support in find_package
34828650d6 find_package: Add experimental gate for CPS support
25cc83428e find_package: Actually import .cps files
91c31ada23 find_package: Actually find .cps files
b89e43b2bc find_package: Start implementing CPS search
3e9f96079d Add additional string case functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10018
2024-12-17 10:12:24 -05:00
Kitware Robot
e0e486f0a9 CMake Nightly Date Stamp 2024-12-17 00:01:11 -05:00
Brad King
c60098c763 Merge topic 'icase_linux'
1897686702 find_library: Handle case-insensitive filesystems on Linux
01d2a64980 cmSystemTools: Add GetDirCase helper function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10089
2024-12-16 09:10:55 -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
Kitware Robot
121a9982f6 CMake Nightly Date Stamp 2024-12-16 00:04:24 -05:00
Kitware Robot
8c38c48d40 CMake Nightly Date Stamp 2024-12-15 00:01:09 -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
Kitware Robot
f60fb11e13 CMake Nightly Date Stamp 2024-12-14 00:01:22 -05:00
Matthew Woehlke
65429611b9 find_package: Fix handling of relative paths in CPS
Change path handling in cmPackageInfoReader to also handle relative
paths (and to convert paths to UNIX slashes). In order to facilitate
(read: minimize) parameter passing, several formerly free functions have
been made into member functions. Also, remove some unused parameters.
2024-12-13 08:58:24 -05:00
Matthew Woehlke
34828650d6 find_package: Add experimental gate for CPS support 2024-12-13 08:58:24 -05:00
Matthew Woehlke
25cc83428e find_package: Actually import .cps files
Implement logic (partly adapted from the 2023 proof-of-concept) to
actually parse CPS files and generate imported targets. Implement logic
to locate and load supplemental files. Adjust prefix handling to require
that the CPS file provides sufficient information to translate the
prefix placeholder into a meaningful path. (Note that this corresponds
to a change in the specification.)
2024-12-13 08:58:24 -05:00
Matthew Woehlke
91c31ada23 find_package: Actually find .cps files
Add a helper class to read CPS files. Use this to teach find_package how
to consider and accept .cps files in its search. (Note that no version
testing is performed at this time.) Add a simple test that we can find a
package from a .cps file and correctly extract the version information.

Note that this doesn't actually import anything from CPS yet.
2024-12-13 08:58:24 -05:00
Matthew Woehlke
b89e43b2bc find_package: Start implementing CPS search
Teach find_package to search CPS search paths, and to look for CPS file
names. Modify the set of file names to also include the file type (CPS
or CMake-script). Modify the search function to allow specifying which
file type(s) to consider.

During full path search, each possible path is searched for only one of
the two possible file types. However, subsequent runs, or when
considering a user-specified path (<name>_DIR), CMake will look for both
file types.

Note that this only adds the new path search logic as described above;
CMake does not yet know how to read CPS files, and there is a high
likelihood that Bad Things will happen if it tries. However, this seemed
like a good place to checkpoint.
2024-12-13 08:58:24 -05:00
Matthew Woehlke
3e9f96079d Add additional string case functions
Add function to perform case-insensitive comparison of two string-view
instancess. Add functions to perform case conversion on string_view.
2024-12-13 08:58:23 -05:00
Brad King
fe7b414916 Merge topic 'normalize-input-paths'
592e95bbea cmFindPackageCommand: Avoid temporarily saving non-existent result
8d6b76771d find_package: Explicitly normalize CONFIG file path as it exists on disk

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10096
2024-12-13 08:57:19 -05:00
Brad King
d82de042c7 Merge topic 'update-kwsys'
6309e298bc Merge branch 'upstream-KWSys' into update-kwsys
8884161843 KWSys 2024-12-12 (60c63c1f)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10097
2024-12-13 08:56:30 -05:00
Cristiano Carvalheiro
419cfe30d0 Xcode: Support for 'LLDB Init File' scheme property
Fixes: #24002
2024-12-13 08:31:11 -05:00
Kitware Robot
d30bbe5c3f CMake Nightly Date Stamp 2024-12-13 00:01:12 -05:00
Brad King
6309e298bc Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2024-12-12 (60c63c1f)
2024-12-12 12:52:51 -05:00
Brad King
592e95bbea cmFindPackageCommand: Avoid temporarily saving non-existent result 2024-12-12 11:38:29 -05:00
Brad King
8d6b76771d find_package: Explicitly normalize CONFIG file path as it exists on disk
This was missed in commit 9d44a77454 (find_*: Explicitly normalize found
paths as they exist on disk, 2024-10-17).
2024-12-12 11:36:40 -05:00
Brad King
f4428d9784 Merge topic 'refactor-ostream-usage'
c225897ca0 cmExportCMakeConfigGenerator: Optimize `std::ostream::operator<<` calls
bdece1c754 Refactor: Optimize `ostream::operator<<()` calls for some generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10079
2024-12-12 09:16:04 -05:00
Brad King
35425256a5 Merge topic 'iface-public-modules'
854eba0c53 target_sources: Improve error message for CXX_MODULES on INTERFACE libraries
cd179e7560 Tests/RunCMake/CXXModules: Rename FileSetModules cases to be more specific

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10090
2024-12-12 09:12:01 -05:00
Brad King
1c04068a8d Merge topic 'install-DESTINATION-regression'
92e63421cb install: Restore treatment of DESTINATION as a single-valued keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10088
2024-12-12 09:01:19 -05:00
Kitware Robot
dd913e9edc CMake Nightly Date Stamp 2024-12-12 00:01:15 -05:00
Russell Greene
1897686702 find_library: Handle case-insensitive filesystems on Linux
Linux 5.2+ supports case-insensitive ext4 filesystems.
Teach `find_library` pattern matching to account for this.

Fixes: #26526
2024-12-11 16:26:05 -07:00
Russell Greene
01d2a64980 cmSystemTools: Add GetDirCase helper function
On Linux, one can set case insensitivity on a per-directory level.
2024-12-11 16:26:01 -07:00
Brad King
854eba0c53 target_sources: Improve error message for CXX_MODULES on INTERFACE libraries
We support non-compiled `SOURCES` on `INTERFACE` libraries, and also
support `CXX_MODULES` on *imported* `INTERFACE` libraries (via synthetic
targets that compile module interface units).  However, we do not
support `CXX_MODULES` on non-imported `INTERFACE` libraries because
there is no place to hold module interface unit's object files for their
module initializers.  Previously this was not explicitly rejected, and
so was diagnosed only by "CMake Internal Error" messages due to
assumption violations in the implementation.

Fixes: #26524
Co-authored-by: Ben Boeckel <ben.boeckel@kitware.com>
2024-12-11 12:34:29 -05:00
Alex Turbov
c225897ca0 cmExportCMakeConfigGenerator: Optimize std::ostream::operator<< calls 2024-12-11 19:40:45 +04:00
Alex Turbov
bdece1c754 Refactor: Optimize ostream::operator<<() calls for some generators 2024-12-11 19:40:41 +04:00
Brad King
77ae9d7585 Merge topic 'codegen-make'
25b43a5b7f Makefile: Enable progress messages for codegen target
af2b340a2e Makefile: Fix per-directory codegen target
b7e6c418e3 cmLocalUnixMakefileGenerator3: Simplify progress command generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10085
2024-12-11 10:10:03 -05:00
Craig Scott
92e63421cb install: Restore treatment of DESTINATION as a single-valued keyword
The `install(RUNTIME_DEPENDENCY_SET)` form processes its arguments in a
slightly different way to other forms of the command. It handles the
`POST_...`, `PRE_...` and `DIRECTORIES` keywords separately. These
keywords are not visible to the first layer of keyword processing, so
they don't terminate multi-value keyword value parsing.

Before commit 6a1fac1450 (install: Normalize DESTINATION paths,
2024-09-18, v3.31.0-rc1~73^2), the `DESTINATION` keyword was handled as
a simple string value. That commit changed it to use a function so it
could process the value before storing it, but the function returned the
wrong value. This meant it was treated as a multi-value keyword instead
of a single-value keyword.

Fixes: #26512
2024-12-11 09:58:39 -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
Brad King
f51d6aee2f Merge topic 'android-native'
f3ecddbaa2 cmAffinity: Fix compilation in native Android builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10083
2024-12-11 09:45:31 -05:00
Brad King
9f8dbcda3b Merge topic 'codegen-ninja'
5ce1ca607f Ninja: Add missing top-level codegen dependencies on per-directory codegen
5d0f2aba7e cmGlobalNinjaGenerator: Simplify per-directory configuration list lookup
505ffdcbde cmGlobalNinjaGenerator: Clarify order of codegen build statement logic
5f33736c03 cmGlobalNinjaGenerator: Fix local variable name for codegen target
e308d1bb88 cmGlobalNinjaGenerator: Remove unnecessary local variable
c08543d711 cmGlobalNinjaGenerator: Remove unused local variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10084
2024-12-11 09:42:09 -05:00
Kitware Robot
4b99073192 CMake Nightly Date Stamp 2024-12-11 00:01:31 -05:00
Brad King
5ce1ca607f Ninja: Add missing top-level codegen dependencies on per-directory codegen
In commit 197cb419d1 (add_custom_command: Add CODEGEN support,
2024-05-27, v3.31.0-rc1~394^2) we accidentally left out the global
`codegen` target's dependencies on the per-directory `codegen` targets.
Add them for parity with the `all` target.

Fixes: #26517
2024-12-10 11:46:31 -05:00
Brad King
5d0f2aba7e cmGlobalNinjaGenerator: Simplify per-directory configuration list lookup 2024-12-10 11:41:27 -05:00
Brad King
505ffdcbde cmGlobalNinjaGenerator: Clarify order of codegen build statement logic
Make it more consistent with the equivalent logic for "all".
2024-12-10 11:41:27 -05:00
Brad King
5f33736c03 cmGlobalNinjaGenerator: Fix local variable name for codegen target 2024-12-10 11:41:26 -05:00
Brad King
e308d1bb88 cmGlobalNinjaGenerator: Remove unnecessary local variable 2024-12-10 11:41:26 -05:00
Brad King
c08543d711 cmGlobalNinjaGenerator: Remove unused local variable 2024-12-10 11:41:26 -05:00
Brad King
25b43a5b7f Makefile: Enable progress messages for codegen target
This was left out of commit 197cb419d1 (add_custom_command: Add CODEGEN
support, 2024-05-27, v3.31.0-rc1~394^2).
2024-12-10 11:36:29 -05:00
Brad King
af2b340a2e Makefile: Fix per-directory codegen target
Issue: #26517
2024-12-10 11:36:29 -05:00