Skip to content

Commit

Permalink
"build events" form of add_custom_command() does not support DEPENDS
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhuggett committed Dec 14, 2024
1 parent 059d8ee commit 18ba06a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmake/run_pstore_unit_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function (run_pstore_unit_test prelink_target test_target)
list (APPEND command_line "--loud")
endif ()

add_dependencies(${prelink_target} ${test_target})
if (PSTORE_VALGRIND)
add_custom_command (
TARGET ${prelink_target}
Expand All @@ -53,7 +54,7 @@ function (run_pstore_unit_test prelink_target test_target)
--track-origins=no --child-silent-after-fork=no --trace-children=no
--error-exitcode=13 ${command_line}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMENT "Valgrind Running ${test_target}" DEPENDS ${test_target}
COMMENT "Valgrind Running ${test_target}"
BYPRODUCTS ${OUT_XML}
VERBATIM
)
Expand All @@ -66,7 +67,7 @@ function (run_pstore_unit_test prelink_target test_target)
"LLVM_PROFILE_FILE=$<TARGET_FILE:${test_target}>.profraw"
${command_line}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMENT "Running ${test_target}" DEPENDS ${test_target}
COMMENT "Running ${test_target}"
BYPRODUCTS ${OUT_XML}
VERBATIM
)
Expand All @@ -76,7 +77,7 @@ function (run_pstore_unit_test prelink_target test_target)
PRE_LINK
COMMAND ${command_line}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMENT "Running ${test_target}" DEPENDS ${test_target}
COMMENT "Running ${test_target}"
BYPRODUCTS ${OUT_XML}
VERBATIM
)
Expand Down

0 comments on commit 18ba06a

Please sign in to comment.