Files
rocm-systems/projects/rocprofiler-systems/examples/python/CMakeLists.txt
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 sor
1.1 KiB
CMake

# Copyright (c) Advanced Micro Devices, Inc.
# SPDX-License-Identifier: MIT
cmake_minimum_required(VERSION 3.21 FATAL_ERROR)
project(rocprofiler-systems-python)
if(ROCPROFSYS_DISABLE_EXAMPLES)
2022-11-01 17:28:12 -05:00
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
2025-06-22 10:44:33 -04:00
if(
${PROJECT_NAME} IN_LIST ROCPROFSYS_DISABLE_EXAMPLES
OR ${_DIR} IN_LIST ROCPROFSYS_DISABLE_EXAMPLES
)
2022-11-01 17:28:12 -05:00
return()
endif()
endif()
2025-06-22 10:44:33 -04:00
set(PYTHON_FILES
builtin.py
external.py
source.py
noprofile.py
fill.py
)
2022-08-31 01:24:31 -05:00
find_package(Python3 COMPONENTS Interpreter)
if(Python3_FOUND)
set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}")
foreach(_FILE ${PYTHON_FILES})
2025-06-22 10:44:33 -04:00
configure_file(
${PROJECT_SOURCE_DIR}/${_FILE}
${PROJECT_BINARY_DIR}/${_FILE}
@ONLY
)
2022-08-31 01:24:31 -05:00
if(ROCPROFSYS_INSTALL_EXAMPLES)
install(
PROGRAMS ${PROJECT_BINARY_DIR}/${_FILE}
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/rocprofiler-systems/examples
2025-06-22 10:44:33 -04:00
COMPONENT rocprofiler-systems-examples
)
2022-08-31 01:24:31 -05:00
endif()
endforeach()
endif()