mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
Add support for specifying CPS's supplemental `description` and `website` attributes. Add ability to inherit these from the `project()`, similar to how version information can be inherited.
25 lines
1.0 KiB
CMake
25 lines
1.0 KiB
CMake
include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake)
|
|
|
|
set(out_dir "${RunCMake_BINARY_DIR}/ProjectMetadata-build")
|
|
|
|
file(READ "${out_dir}/foo.cps" content)
|
|
expect_value("${content}" "foo" "name")
|
|
expect_value("${content}" "1.2.3" "version")
|
|
expect_value("${content}" "1.1.0" "compat_version")
|
|
expect_value("${content}" "Sample package" "description")
|
|
expect_value("${content}" "https://www.example.com/package/foo" "website")
|
|
|
|
file(READ "${out_dir}/test1.cps" content)
|
|
expect_value("${content}" "test1" "name")
|
|
expect_value("${content}" "1.2.3" "version")
|
|
expect_value("${content}" "1.1.0" "compat_version")
|
|
expect_value("${content}" "Sample package" "description")
|
|
expect_value("${content}" "https://www.example.com/package/foo" "website")
|
|
|
|
file(READ "${out_dir}/test2.cps" content)
|
|
expect_value("${content}" "test2" "name")
|
|
expect_value("${content}" "1.4.7" "version")
|
|
expect_missing("${content}" "compat_version")
|
|
expect_value("${content}" "Don't inherit" "description")
|
|
expect_value("${content}" "https://www.example.com/package/bar" "website")
|