Files
CMake/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration-check.cmake
Tor Arne Vestbø 021492038e Xcode: Generate BuildableProductRunnable for ProfileAction
Similarly to the LaunchAction we need to associate a runnable
executable with the launch action.
2024-02-15 16:37:07 +01:00

20 lines
589 B
CMake

set(schema "${RunCMake_TEST_BINARY_DIR}/XcodeSchemaGeneration.xcodeproj/xcshareddata/xcschemes/foo.xcscheme")
if(NOT EXISTS "${schema}")
set(RunCMake_TEST_FAILED "Generated schema ${schema} does not exist.")
return()
endif()
execute_process(COMMAND
/usr/bin/xmllint --xpath "//Scheme/ProfileAction/BuildableProductRunnable" ${schema}
OUTPUT_VARIABLE stdout
ERROR_VARIABLE stderr
RESULT_VARIABLE exit_code
ERROR_STRIP_TRAILING_WHITESPACE
)
if(exit_code)
set(RunCMake_TEST_FAILED "Failed to find BuildableProductRunnable for profile action: ${stderr}")
return()
endif()