DynamoRIO
|
create_annotation.p6
Since the annotation declarations and definitions are only referenced by target programs (not by MemClient itself), no additions to the MemClient build are required. However, to simplify integration of the new annotation into target programs, the MemClient developer may wish to provide a cmake package that defines a function for configuring annotations. DynamoRIO provides a similar function use_DynamoRIO_annotations() for its default annotations, so it will be easiest to start with a copy of that function from DynamoRIOConfig.cmake (which is located in the DynamoRIO source tree in make/DynamoRIOConfig.cmake.in):
# For configuring target applications that use default DynamoRIO annotations function (use_DynamoRIO_annotations target target_srcs) set(dr_annotation_dir "${DynamoRIO_cwd}/../include/annotations") set(dr_annotation_srcs "${dr_annotation_dir}/dr_annotations.c") configure_DynamoRIO_annotation_sources("${dr_annotation_srcs}") set(${target_srcs} ${${target_srcs}} ${dr_annotation_srcs} PARENT_SCOPE) endfunction (use_DynamoRIO_annotations target target_srcs)