File size: 473 Bytes
be11144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
file(GLOB_RECURSE example_srcs
  RELATIVE "${CMAKE_CURRENT_LIST_DIR}"
  CONFIGURE_DEPENDS
  example_*.cu
)

foreach (cub_target IN LISTS CUB_TARGETS)
  foreach (example_src IN LISTS example_srcs)
    get_filename_component(example_name "${example_src}" NAME_WE)
    string(REGEX REPLACE
      "^example_device_" "device."
      example_name "${example_name}"
    )
    cub_add_example(target_name ${example_name} "${example_src}" ${cub_target})
  endforeach()
endforeach()