mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-05 06:40:26 -06:00
Change the interface of the `export` command so that `PACKAGE_INFO` and `SBOM` are proper, first-level sub-commands, rather than being implemented via `export(EXPORT ... (PACKAGE_INFO|SBOM) ...)`. This brings consistency with the `install` command and also simplifies argument parsing. Update the documentation and test cases accordingly. Some of the argument handling test cases are now rather gratuitous, and are removed, which also improves consistency with the `install` tests.
16 lines
306 B
CMake
16 lines
306 B
CMake
set(
|
|
CMAKE_EXPERIMENTAL_EXPORT_PACKAGE_INFO
|
|
"7fa7d13b-8308-4dc7-af39-9e450456d68f"
|
|
)
|
|
|
|
add_library(foo INTERFACE)
|
|
install(TARGETS foo EXPORT foo DESTINATION .)
|
|
|
|
# Try exporting with an unrecognized schema.
|
|
export(
|
|
PACKAGE_INFO foo
|
|
EXPORT foo
|
|
VERSION "irrelevant"
|
|
VERSION_SCHEMA "unrecognized"
|
|
)
|