Requirements-check.cmake 873 B

1234567891011121314151617181920
  1. include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake)
  2. set(out_dir "${RunCMake_BINARY_DIR}/Requirements-build/CMakeFiles/Export/510c5684a4a8a792eadfb55bc9744983")
  3. file(READ "${out_dir}/foo.cps" content)
  4. expect_value("${content}" "foo" "name")
  5. expect_value("${content}" "interface" "components" "libb" "type")
  6. file(READ "${out_dir}/bar.cps" content)
  7. expect_value("${content}" "bar" "name")
  8. expect_null("${content}" "requires" "foo")
  9. expect_null("${content}" "requires" "test")
  10. expect_value("${content}" "interface" "components" "libc" "type")
  11. expect_value("${content}" "interface" "components" "libd" "type")
  12. string(JSON component GET "${content}" "components" "libd")
  13. expect_array("${component}" 3 "requires")
  14. expect_value("${component}" "test:liba" "requires" 0)
  15. expect_value("${component}" "foo:libb" "requires" 1)
  16. expect_value("${component}" ":libc" "requires" 2)