mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-09 08:40:11 -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
306 B
CMake
16 lines
306 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.
|
|
export(
|
|
EXPORT foo
|
|
PACKAGE_INFO foo
|
|
VERSION "irrelevant"
|
|
VERSION_SCHEMA "unrecognized"
|
|
)
|