mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-03-14 20:27:24 +00:00
Add nvbench.test.all and nvbench.example.all metatargets.
This commit is contained in:
@@ -6,6 +6,9 @@ set(example_srcs
|
||||
throughput.cu
|
||||
)
|
||||
|
||||
# Metatarget for all examples:
|
||||
add_custom_target(nvbench.example.all)
|
||||
|
||||
foreach(example_src IN LISTS example_srcs)
|
||||
get_filename_component(example_name "${example_src}" NAME_WLE)
|
||||
string(PREPEND example_name "nvbench.example.")
|
||||
@@ -19,4 +22,6 @@ foreach(example_src IN LISTS example_srcs)
|
||||
RUNTIME_OUTPUT_DIRECTORY "${NVBench_EXECUTABLE_OUTPUT_DIR}"
|
||||
)
|
||||
add_test(NAME ${example_name} COMMAND "$<TARGET_FILE:${example_name}>")
|
||||
|
||||
add_dependencies(nvbench.example.all ${example_name})
|
||||
endforeach()
|
||||
|
||||
@@ -16,6 +16,9 @@ set(test_srcs
|
||||
type_list.cu
|
||||
)
|
||||
|
||||
# Metatarget for all examples:
|
||||
add_custom_target(nvbench.test.all)
|
||||
|
||||
foreach(test_src IN LISTS test_srcs)
|
||||
get_filename_component(test_name "${test_src}" NAME_WLE)
|
||||
string(PREPEND test_name "nvbench.test.")
|
||||
@@ -29,4 +32,6 @@ foreach(test_src IN LISTS test_srcs)
|
||||
RUNTIME_OUTPUT_DIRECTORY "${NVBench_EXECUTABLE_OUTPUT_DIR}"
|
||||
)
|
||||
add_test(NAME ${test_name} COMMAND "$<TARGET_FILE:${test_name}>")
|
||||
|
||||
add_dependencies(nvbench.test.all ${test_name})
|
||||
endforeach()
|
||||
|
||||
Reference in New Issue
Block a user