Commit Graph

964 Commits

Author SHA1 Message Date
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Brad King
7f850fba3c Merge topic 'rel-sunos'
5dd973f900 ci: Convert sunos packaging jobs to build sunos-{x86_64,sparc64} binaries
fd1907e50e Utilities/Release: Convert base images to build sunos-{x86_64,sparc64}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10401
2025-02-28 11:09:49 -05:00
Brad King
5dd973f900 ci: Convert sunos packaging jobs to build sunos-{x86_64,sparc64} binaries 2025-02-27 16:35:09 -05:00
Matthew Woehlke
c8ccd5a9e3 export: Add build-tree CPS support
Add Common Package Specification support to export(EXPORT).
2025-02-25 15:42:23 -05:00
Brad King
4db9e1009d Solaris: Backport our mkdtemp code paths to SunOS 5.10 i386
`mkdtemp` is not available on this architecture until SunOS 5.11.
Look up the symbol at runtime, and if missing, fall back to an
approximate implementation.
2025-02-09 13:29:39 -05:00
Daniel Pfeifer
fda055c260
cmCTestConfigureHandler: Move class into cmCTestConfigureCommand.cxx
Place declaration and definitions into places where following
refactoring will cause minimal deltas.
2025-02-04 15:57:39 +01:00
Daniel Tierney
abbe41578d cmake: Add SARIF diagnostics output support
Closes: #26587
2025-01-29 08:43:19 -05:00
Brad King
292aaffb78 Source: Remove unused cmCommandArgument{Lexer,Parser}
These were used only for the CMP0053 OLD behavior, which has
now been removed.
2025-01-20 09:46:55 -05:00
Brad King
850174c507 CMP0036: Remove support for OLD build_name command 2025-01-19 09:41:01 -05:00
Brad King
5b255fe7da CMP0035: Remove support for OLD variable_requires command 2025-01-19 09:41:01 -05:00
Brad King
84c3943873 CMP0034: Remove support for OLD utility_source command 2025-01-19 09:41:01 -05:00
Brad King
76702e36e3 CMP0033: Remove support for OLD export_library_dependencies command 2025-01-19 09:41:00 -05:00
Brad King
ff6d55f8c5 CMP0032: Remove support for OLD output_required_files command 2025-01-19 09:41:00 -05:00
Brad King
dc0c6734d3 CMP0031: Remove support for OLD load_command command 2025-01-19 09:41:00 -05:00
Brad King
6bdf4efbb3 CMP0030: Remove support for OLD use_mangled_mesa command 2025-01-19 09:41:00 -05:00
Brad King
683a02f5a0 CMP0029: Remove support for OLD subdir_depends command 2025-01-19 09:41:00 -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
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
Daniel Pfeifer
255b1af5af cmCTestUpdateHandler: Move class into cmCTestUpdateCommand.cxx
Place declaration and definitions into places where following
refactoring will cause minimal deltas.
2024-11-13 10:39:44 +01:00
Daniel Pfeifer
db3ccdce41 cmCTestUploadHandler: Move class into cmCTestUploadCommand.cxx
Place declaration and definitions into places where following
refactoring will cause minimal deltas.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer
1b8f9274b2 cmCommand: Remove
Finally. All commands are immutable.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer
8768a0c6e1 cmCTest*Command: Port away from cmCommand
Copy the necessary parts, but remove cloning and make all commands
immutable.
2024-11-05 10:20:12 +01:00
Brad King
f9f4ab55ac Merge topic 'path-resolver'
1a6015e5fc PathResolver: Add helper to compute normalized paths
2a6f86ec5e Tests/CMakeLib: Remove stray output from test loop
646f37b473 clang-tidy: disable modernize-concat-nested-namespaces

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9965
2024-11-03 08:19:10 -05:00
Brad King
1a6015e5fc PathResolver: Add helper to compute normalized paths
Create a `cm::PathResolver` helper to compute normalized paths.
Provide a common implementation with compile-time dispatch to
select details w.r.t. symbolic links, existence, and matching
the on-disk case of existing paths.  Later we can use this to
implement:

* `ToNormalizedPathOnDisk`: Normalizes paths while resolving symlinks
  only when followed by `..` components.  Does not require paths to
  exist, but reads on-disk case of paths that do exist (on Windows).

* `GetRealPath`: Normalizes paths while resolving all symlinks.
   Requires paths to exist, and reads their on-disk case (on Windows).

* `CollapseFullPath`: Normalizes paths in memory without disk access.
  Assumes components followed by `..` components are not symlinks.

Abstract filesystem access through runtime dispatch so that we can test
Windows symbolic link and network path behavior without relying on real
environments.  The overhead of runtime dispatch should be insignificant
during real filesystem access.

Issue: #16228
Issue: #17206
2024-11-01 08:44:17 -04:00
Daniel Pfeifer
86225833f2 cmCTestTestHandler: Consolidate Output options into cmCTestTestOptions 2024-10-29 11:25:05 +01:00
Brad King
3d2882290b ctest: Split --build-and-test implementation from handler infrastructure
It does not follow the pattern of the dashboard-mode step handlers.
2024-10-15 11:59:51 -04:00
Ben Boeckel
4df5a6fbb4 cmBuildDatabase: add initial structures
This class represents a build database as introduced by P2977R0. It
includes support for reading, writing, and merging.

See: http://wg21.link/p2977r0
2024-08-27 12:36:46 -04:00
Ben Boeckel
5b89e46c11 cmCommandLineArgument: add missing header to source list 2024-08-27 11:30:23 -04:00
Matthew Woehlke
3d52d70b84 export: Add initial CPS support
Add initial support for exporting (install only, for now) Common Package
Specification (https://cps-org.github.io/cps/) format package
descriptions. This has some limitations, such as not supporting
generator expressions (as these cannot be portably exported), and only
partially supporting transitive dependencies, but should be usable for
at least some simple cases. (Actually, $<LINK_ONLY> is theoretically
supportable, but is not yet implemented.)

This still needs tests; these will be added in the next commit. Other
potential improvements include support for language-specific compile
definitions and inferring some package properties from project
properties. Additionally, there is no module support yet; this is partly
pending on having a tool agnostic format for providing the necessary
information.
2024-08-14 15:25:27 -04:00
Vito Gamberini
8555c33d92
PkgC: Add cmake_pkg_config(EXTRACT) command
* Wraps the llpkgc parser with cmPkgConfigParser
* Adds various resolution and mangling code under cmPkgConfigResolver
* Documents new command cmake_pkg_config(EXTRACT). Documentation is written with
  the assumption additional subcommands will be added soon.
* Adds various tests for the above
2024-07-29 13:14:46 -04:00
Vito Gamberini
35734c8de3
PkgC: Add llpkgc to build 2024-07-29 13:14:41 -04:00
Matthew Woehlke
20fa4ce8d8 export: Factor out CMake-specific export generation (2/2)
In order to support generation of Common Package Specifications, the
mechanisms CMake uses to export package information need to be made more
abstract. The prior commits began this refactoring; this continues by
(actually) restructuring the classes used to generate the actual export files.
To minimize churn, this introduces virtual base classes and
diamond inheritance in order to separate logic which is format-agnostic
but depends on the export mode (build-tree versus install-tree) from
logic which is format-specific but mode-agnostic.

This could probably be refactored further to use helper classes instead,
and a future commit may do that, however an initial attempt to do that
was proving even more invasive, such that this approach was deemed more
manageable.

While we're at it, add 'const' in more places where possible.
2024-07-23 12:13:39 -04:00
Matthew Woehlke
a6cc595772 export: Factor out CMake-specific export generation (1/2)
In order to support generation of Common Package Specifications, the
mechanisms CMake uses to export package information need to be made more
abstract. As a first step toward this, refactor cmInstallExportGenerator
so that logic specific to config.cmake and Android .mk lives in separate
subclasses.

While we're at it, clean up the code style a bit and try to use moves a
bit more consistently.

This is step 1 of 2. The next step will refactor the individual file
generators along similar lines, which will also involve creating
additional classes for format-agnostic logic that is shared between
build-tree and install-tree variants.
2024-07-18 12:08:43 -04:00
Martin Duffy
159ba027b9 Install: Add parallel installation option
Fixes: #26000
2024-07-15 11:49:29 -04:00
René Bertin
598bc70474 file: Add undocumented READ_MACHO subcommand on macOS
Provide a way to parse the architectures of a Mach-O binary.

Issue: #25952
2024-06-04 08:37:47 -04:00
Brad King
09c74c6d0c cmGeneratorTarget: Factor transitive property methods into own source 2024-05-20 19:29:15 -04:00
Brad King
feaca40931 cmGeneratorTarget: Factor link interface/impl methods into own source 2024-05-20 19:28:06 -04:00
Brad King
b4924c562a cmGeneratorTarget: Factor compatible interface properties into own source 2024-05-20 19:26:05 -04:00
Brad King
cdd7112a5d cmGeneratorTarget: Factor options-like usage requirements into own source 2024-05-20 19:24:48 -04:00
Brad King
881a46819e cmGeneratorTarget: Factor LINK_DIRECTORIES impl into own source 2024-05-20 19:23:13 -04:00
Brad King
0a3c97308d cmGeneratorTarget: Factor INCLUDE_DIRECTORIES impl into own source 2024-05-20 19:21:45 -04:00
Brad King
7ffb92022c cmGeneratorTarget: Factor SOURCES impl into own source 2024-05-20 19:20:21 -04:00
Brad King
d0fc932528 cmGeneratorTarget: Factor TargetPropertyEntry into own source 2024-05-20 19:16:57 -04:00
Brad King
ed983b1a5d cmTargetTraceDependencies: Factor out of cmGeneratorTarget 2024-05-20 19:12:19 -04:00
Brad King
03c31b0395 Drop Visual Studio 9 2008 generator
This generator has been deprecated since CMake 3.27.  Remove it.
2024-05-08 10:37:34 -04:00
Brad King
5396f4a9a3 cmUVJobServerClient: Add libuv-based job server integration client 2023-12-03 08:30:06 -05:00
Brad King
6ef03ca03e cmUVSignalHackRAII: Drop outdated and unused libuv SA_RESTART workaround
It is only needed for libuv < 1.19, but since commit c050d6a01e
(string(TIMESTAMP): add %f specifier for microseconds, 2022-01-27,
v3.23.0-rc1~59^2) we require libuv >= 1.28.
2023-11-17 08:49:21 -05:00
Kyle Edwards
c6e6861e63 install(EXPORT): Export find_dependency() calls
Issue: #20511
Co-Authored-by: Brad King <brad.king@kitware.com>
Co-Authored-by: Robert Maynard <rmaynard@nvidia.com>
2023-11-13 11:07:52 -05:00
Brad King
99fa01d3fa cmStandardLevelResolver: Factor out public representation of level 2023-10-04 17:14:58 -04:00
Brad King
0788accdfc Merge topic 'imported-cxxmodules'
48ee946fdc cmExperimental: recycle the C++ modules API UUID
1a1806a71b gitlab-ci: declare `bmionly` support for modules where possible
457a12f3f9 Tests/RunCMake/CXXModules: add tests which use modules from imported targets
9b9ec70b54 Ninja: generate scanning and build rules for C++20 module synthetic targets
80ef50a191 CXXModules: add a variable for BMI-only compilation
80d6544398 cxxmodules: generate synthetic targets as an initial pass
3dc6676ecc cmSyntheticTargetCache: add a struct for synthetic target caching
cb356b540c cmCxxModuleUsageEffects: add a class to capture module usage effects
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8535
2023-08-21 09:49:48 -04:00