Files
CMake/Tests/RunCMake/ExportPackageInfo/Minimal-check.cmake
T
Daniel Tierney df3e246bc1 export: Import/export target property for license
Add import/export support and documentation for the SPDX_LICENSE
target property. A target's license can be specified by setting
this property to an SPDX license expression. CMake and CPS-format
export files generated with `export()` or `install()` will
retain the license information. CMake also imports the license
property for imported targets.

Closes: #26706
2025-05-13 17:01:20 -04:00

20 lines
958 B
CMake

include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake)
set(out_dir "${RunCMake_BINARY_DIR}/Minimal-build")
file(READ "${out_dir}/foo.cps" content)
expect_value("${content}" "foo" "name")
expect_value("${content}" "interface" "components" "foo" "type")
expect_missing("${content}" "version")
expect_missing("${content}" "configurations")
expect_missing("${content}" "default_targets")
expect_missing("${content}" "components" "foo" "compile_definitions")
expect_missing("${content}" "components" "foo" "compile_features")
expect_missing("${content}" "components" "foo" "compile_flags")
expect_missing("${content}" "components" "foo" "link_directories")
expect_missing("${content}" "components" "foo" "link_features")
expect_missing("${content}" "components" "foo" "link_flags")
expect_missing("${content}" "components" "foo" "link_libraries")
expect_missing("${content}" "components" "foo" "requires")
expect_missing("${content}" "components" "foo" "license")