File: InterfaceProperties-check.cmake

package info (click to toggle)
cmake 4.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 152,344 kB
  • sloc: ansic: 403,894; cpp: 303,807; sh: 4,097; python: 3,582; yacc: 3,106; lex: 1,279; f90: 538; asm: 471; lisp: 375; cs: 270; java: 266; fortran: 239; objc: 215; perl: 213; xml: 198; makefile: 108; javascript: 83; pascal: 63; tcl: 55; php: 25; ruby: 22
file content (25 lines) | stat: -rw-r--r-- 1,175 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake)

set(out_dir "${RunCMake_BINARY_DIR}/InterfaceProperties-build/CMakeFiles/Export/510c5684a4a8a792eadfb55bc9744983")

file(READ "${out_dir}/foo.cps" content)
expect_value("${content}" "foo" "name")

string(JSON component GET "${content}" "components" "foo")

expect_value("${component}" "interface" "type")
expect_array("${component}" 1 "includes")
expect_value("${component}" "@prefix@/include/foo" "includes" 0)
expect_array("${component}" 1 "compile_features")
expect_value("${component}" "c++23" "compile_features" 0)
expect_array("${component}" 1 "compile_flags")
expect_value("${component}" "-ffast-math" "compile_flags" 0)
expect_null("${component}" "definitions" "*" "FOO")
expect_value("${component}" "BAR" "definitions" "*" "BAR")
expect_array("${component}" 1 "link_directories")
expect_value("${component}" "/opt/foo/lib" "link_directories" 0)
expect_array("${component}" 1 "link_flags")
expect_value("${component}" "--needed" "link_flags" 0)
expect_array("${component}" 1 "link_libraries")
expect_value("${component}" "/usr/lib/libm.so" "link_libraries" 0)
expect_value("${component}" "BSD-3-Clause" "license")