Files
cmake/Tests/RunCMake/ExportPackageInfo/ProjectMetadata-check.cmake
Matthew Woehlke ed6e9abf98 CPS, SBOM: Fix default output destination
- Change default CPS install path on Windows from `cps` to `cps/<name>`,
per community recommendation that only paths containing the package name
should be considered as "officially" supported search locations (see
https://github.com/cps-org/cps/issues/79#issuecomment-2831102822).

- Change `export` to write to a subdirectory that allows the build
tree to be used as a search root.

- Change SBOM destinations to be consistent with the preceding.

Issue: #27785
2026-05-19 13:31:56 -04:00

28 lines
1.2 KiB
CMake

include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake)
set(out_dir "${RunCMake_BINARY_DIR}/ProjectMetadata-build")
file(READ "${out_dir}/cps/foo/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}" "BSD-3-Clause" "license")
expect_value("${content}" "Sample package" "description")
expect_value("${content}" "https://www.example.com/package/foo" "website")
file(READ "${out_dir}/cps/test1/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}" "BSD-3-Clause" "license")
expect_value("${content}" "Sample package" "description")
expect_value("${content}" "https://www.example.com/package/foo" "website")
file(READ "${out_dir}/cps/test2/test2.cps" content)
expect_value("${content}" "test2" "name")
expect_value("${content}" "1.4.7" "version")
expect_missing("${content}" "compat_version")
expect_value("${content}" "Apache-2.0" "license")
expect_value("${content}" "Don't inherit" "description")
expect_value("${content}" "https://www.example.com/package/bar" "website")