File: test_execute_and_compare.cmake

package info (click to toggle)
extra-cmake-modules 5.103.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,116 kB
  • sloc: python: 1,744; cpp: 646; ansic: 258; xml: 182; sh: 36; makefile: 5
file content (11 lines) | stat: -rw-r--r-- 552 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
string(REPLACE / ";" processedArgs "${ARG_UNPARSED_ARGUMENTS}")

execute_process(COMMAND qmlplugindump -nonrelocatable ${processedArgs} ${KDE_INSTALL_QMLDIR} > ${CMAKE_CURRENT_SOURCE_DIR}/plugins.qmltypes RESULT_VARIABLE code)
if(code)
    message(FATAL_ERROR "Could not call qmlplugindump successfully. Exited with code ${code}")
endif()

execute_process(COMMAND diff -I "//*" ${INPUT} ${CMAKE_CURRENT_SOURCE_DIR}/plugins.qmltypes RESULT_VARIABLE code OUTPUT_VARIABLE out)
if(code)
    message(FATAL_ERROR "both plugin dumps differ:\n${out}")
endif()