mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-09 00:29:55 -06:00
Add version validation to cmExportPackageInfoGenerator. Specifically, if a package uses the "simple" version schema (which is the default if no schema is specified), validate that the specified version actually conforms to the schema and issue an error if it does not. Also, issue a warning if the schema is not recognized.
16 lines
307 B
CMake
16 lines
307 B
CMake
set(
|
|
CMAKE_EXPERIMENTAL_EXPORT_PACKAGE_INFO
|
|
"b80be207-778e-46ba-8080-b23bba22639e"
|
|
)
|
|
|
|
add_library(foo INTERFACE)
|
|
install(TARGETS foo EXPORT foo DESTINATION .)
|
|
|
|
# Try exporting with an unrecognized schema.
|
|
install(
|
|
PACKAGE_INFO foo
|
|
EXPORT foo
|
|
VERSION "irrelevant"
|
|
VERSION_SCHEMA "unrecognized"
|
|
)
|