From b9497863bead958192d9ce851f072e1934ebba13 Mon Sep 17 00:00:00 2001 From: TB Schardl Date: Sat, 4 Sep 2021 18:59:08 +0000 Subject: [PATCH] [cmake] Install rr_commands.py into share/cilksan. --- cilksan/CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cilksan/CMakeLists.txt b/cilksan/CMakeLists.txt index 8999c22..292b1c7 100644 --- a/cilksan/CMakeLists.txt +++ b/cilksan/CMakeLists.txt @@ -9,6 +9,9 @@ set(CILKSAN_SOURCES locking.cpp print_addr.cpp) +set(CILKSAN_RR_FILES + rr_commands.py) + include_directories(${CILKTOOLS_SOURCE_DIR}/include) set(CILKSAN_CFLAGS ${SANITIZER_COMMON_CFLAGS}) @@ -123,3 +126,16 @@ endif() if (CILKTOOLS_INCLUDE_TESTS) # TODO: add tests endif() + +foreach (file ${CILKSAN_RR_FILES}) + install(PROGRAMS ${file} + DESTINATION share/cilksan + COMPONENT cilksan-rr) +endforeach (file) + +add_custom_target(cilksan-rr DEPENDS ${CILKSAN_RR_FILES}) +if(NOT LLVM_ENABLE_IDE) + add_llvm_install_targets("install-cilksan-rr" + DEPENDS cilksan-rr + COMPONENT cilksan-rr) +endif()