Files
rocm-systems/examples/rewrite-caller/CMakeLists.txt
T
Mészáros Gergely 1b8f09aa2d instrumentation: include functions with specific calls (#202)
* instrumentation: include functions with specific calls

Add the option `--caller-include <regex>` or environment variable
`OMNITRACE_REGEX_CALLER_INCLUDE` to instrument functions which contain
call to a set of functions, E.g. `--caller-include foo` instruments any
function which calls `foo`.

* Serialize caller include information

* Add test for caller include

* Tweak to the caller include test

- tweak environment
- tweak pass regexes

* Set rewrite caller example to debug

, to avoid optimizing out the call expressions that it relies on.

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
2022-11-11 02:32:57 -06:00

25 lines
691 B
CMake

cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
project(omnitrace-rewrite-caller-example LANGUAGES CXX)
if(OMNITRACE_DISABLE_EXAMPLES)
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
if(${PROJECT_NAME} IN_LIST OMNITRACE_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
OMNITRACE_DISABLE_EXAMPLES)
return()
endif()
endif()
set(CMAKE_BUILD_TYPE "Debug")
add_executable(rewrite-caller rewrite-caller.cpp)
target_compile_options(rewrite-caller PRIVATE ${_FLAGS})
if(OMNITRACE_INSTALL_EXAMPLES)
install(
TARGETS rewrite-caller
DESTINATION bin
COMPONENT omnitrace-examples)
endif()