From 820a790fc265dd1b1d0b8cd74b595da3b6d7a94e Mon Sep 17 00:00:00 2001 From: Karl W Schulz Date: Thu, 18 Apr 2024 11:03:59 -0500 Subject: [PATCH] enable optional tests component install Signed-off-by: Karl W Schulz [ROCm/rocprofiler-compute commit: eedb78139c91aafc544adf844a3f83d9831fe1e5] --- projects/rocprofiler-compute/CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/projects/rocprofiler-compute/CMakeLists.txt b/projects/rocprofiler-compute/CMakeLists.txt index b6c045400b..12c786c97a 100644 --- a/projects/rocprofiler-compute/CMakeLists.txt +++ b/projects/rocprofiler-compute/CMakeLists.txt @@ -329,6 +329,21 @@ add_custom_target( "src/omniperf,cmake/Dockerfile,cmake/rocm_install.sh,docker/docker-entrypoint.sh,src/omniperf_analyze/convertor/mongodb/convert" ) +option(INSTALL_TESTS "Build test suite" OFF) +if(INSTALL_TESTS) + set(TESTS_COMPONENT "tests") + install( + DIRECTORY tests + DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/${PROJECT_NAME} + FILES_MATCHING + PATTERN "*.py" + PATTERN "__pycache__" EXCLUDE) + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CTestTestfile.cmake + DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/${PROJECT_NAME}) +endif() +message(STATUS "Install tests: ${INSTALL_TESTS}") + # ---------- # Packaging # ----------