2 function(dtrace_usdt_probe script)
 
   4   set(single_parameter_options TARGET_NAME OUTPUT_SOURCES)
 
   5   set(multiple_parameter_options)
 
   7   cmake_parse_arguments("" "${options}" "${single_parameter_options}" "${multiple_parameter_options}" ${ARGN})
 
   9   get_filename_component(script_we ${script} NAME_WE)
 
  11   add_custom_command(OUTPUT
 
  12                        ${CMAKE_CURRENT_BINARY_DIR}/${script_we}.h
 
  14                        ${dtrace_EXECUTABLE} -h -s ${script} -o ${CMAKE_CURRENT_BINARY_DIR}/${script_we}.h
 
  17   add_custom_target(dtrace-usdt-header-${script_we}
 
  19                       ${CMAKE_CURRENT_BINARY_DIR}/${script_we}.h)
 
  21     set(${_TARGET_NAME} dtrace-usdt-header-${script_we} PARENT_SCOPE)
 
  24     set(${_OUTPUT_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/${script_we}.h PARENT_SCOPE)