Next modify elements of the cmake function for usage with the MemClient annotations:
+# For configuring target applications that use MemClient annotations +function (use_MemClient_annotations target target_srcs) + set(memclient_annotation_dir "${MemClient_cwd}/../include/annotations") + set(memclient_annotation_srcs "${memclient_annotation_dir}/memclient_annotations.c") + configure_DynamoRIO_annotation_sources("${memclient_annotation_srcs}") + set(${target_srcs} ${${target_srcs}} ${memclient_annotation_srcs} PARENT_SCOPE) +endfunction (use_MemClient_annotations target target_srcs)
Note that the cmake variable memclient_annotation_dir has been set to the same direcotry as the default DynamoRIO annotation directory, but this is not required–the client developer may choose to put the new annotations in any directory within the build output area.
In more general terms, this cmake function takes the following steps:
Target applications that are not built with cmake will need to take these same 3 steps in a comparable way.