Tests: fix RunCMake_TEST_FILTER with non-matching TargetGenexEvent

This commit is contained in:
Alex Overchenko
2026-07-31 09:31:00 +03:00
committed by AJIOB
parent 0a4b5c1e36
commit 94e37bc281
2 changed files with 4 additions and 9 deletions

View File

@@ -50,15 +50,7 @@ if(NOT RunCMake_GENERATOR STREQUAL "Ninja Multi-Config")
unset(RunCMake_TEST_NO_CLEAN)
endif()
function(test_genex name)
run_configure_and_build(${name})
if(NOT EXISTS "${RunCMake_BINARY_DIR}/${name}-build/wdir/touched")
message(SEND_ERROR "File not created by target-dependent add_custom_command()!")
endif()
endfunction()
test_genex(TargetGenexEvent)
run_configure_and_build(TargetGenexEvent)
if(NOT RunCMake_GENERATOR STREQUAL "Xcode")
run_configure_and_build(CommentGenex)

View File

@@ -0,0 +1,3 @@
if(NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/wdir/touched")
set(RunCMake_TEST_FAILED "File not created by target-dependent add_custom_command()!")
endif()