Commit Graph

68313 Commits

Author SHA1 Message Date
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
Brad King
c060f44657 Merge topic 'jsoncpp-version-header'
0330513c24 jsoncpp: Add cm3p/ header for json/version.h

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10094
2024-12-13 08:55:40 -05:00
Brad King
ab92f477b1 Merge topic 'FindPython-enhance-virtualenv-lookup'
11aff3c490 FindPython: enhance Development artifacts lookup in virtual environment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10091
2024-12-13 08:54:24 -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
KWSys Upstream
8884161843 KWSys 2024-12-12 (60c63c1f)
Code extracted from:

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

at commit 60c63c1fa7f288132353498faa9733d2d6cb7b0e (master).

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

Brad King (1):
      62ad438e Glob: Use case-insensitive matching on CYGWIN

Peter Kokot (1):
      967b2120 Remove legacy unused IMMEDIATE CMake keyword
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
a85477432e Merge branch 'release-3.31' 2024-12-12 09:14:44 -05:00
Brad King
e7bf9c312e Merge branch 'release-3.30' 2024-12-12 09:14:42 -05:00
Brad King
ab3f1a2782 Merge branch 'release-3.30' into release-3.31 2024-12-12 09:14:36 -05:00
Brad King
e80d42cf6b Merge topic 'iface-public-modules' into release-3.30
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>
Merge-request: !10090
2024-12-12 09:12:25 -05:00
Brad King
d6962a66c3 Merge branch 'release-3.31' 2024-12-12 09:12:01 -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
2670dd4ed1 Merge topic 'iface-public-modules' into release-3.31
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:11:59 -05:00
Brad King
62ea2a05b5 Merge branch 'release-3.31' 2024-12-12 09:01:20 -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
Brad King
6622ae651f Merge topic 'install-DESTINATION-regression' into release-3.31
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:18 -05:00
Brad King
0330513c24 jsoncpp: Add cm3p/ header for json/version.h
Add a `cm3p/` header to use the selected copy of the library.
2024-12-12 08:26:22 -05:00
Marc Chevrier
11aff3c490 FindPython: enhance Development artifacts lookup in virtual environment
To enable to locate development artifacts, in the context of virtual
environment, without requiring Interpreter component, rely on the
configuration file pyvenv.cfg.

Fixes: #26505
2024-12-12 13:53:11 +01:00
Kitware Robot
dd913e9edc CMake Nightly Date Stamp 2024-12-12 00:01:15 -05: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
Brad King
cd179e7560 Tests/RunCMake/CXXModules: Rename FileSetModules cases to be more specific
They all add `CXX_MODULES` to `STATIC` libraries.
2024-12-11 12:20:45 -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
54e998629d Merge branch 'release-3.31' 2024-12-11 10:10:04 -05: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
Brad King
4671919cbb Merge topic 'codegen-make' into release-3.31
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:02 -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
6ae6d879f5 Merge topic 'improve-coding-conventions'
b4704d3ef8 Help/dev: Improve coding conventions guide

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10086
2024-12-11 09:44:40 -05:00
Brad King
e9fffd93fa Merge branch 'release-3.31' 2024-12-11 09:42:09 -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
Brad King
f5c5b39ce8 Merge topic 'codegen-ninja' into release-3.31
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:07 -05:00
Kitware Robot
4b99073192 CMake Nightly Date Stamp 2024-12-11 00:01:31 -05:00
Matthew Woehlke
b4704d3ef8 Help/dev: Improve coding conventions guide
Improve the coding conventions specified in our source code guide:

- Recommend capitalization for locals as well as members.

- Remove exceptions for `const` placement; new code should always prefer
  "east" style.

- Remove separate section; "Code Style" and "Code Conventions" are
  similar enough to not need to make a distinction.
2024-12-10 14:18:08 -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