diff --git a/projects/rocprofiler/src/api/CMakeLists.txt b/projects/rocprofiler/src/api/CMakeLists.txt index 04f4708b2f..61782f088d 100644 --- a/projects/rocprofiler/src/api/CMakeLists.txt +++ b/projects/rocprofiler/src/api/CMakeLists.txt @@ -1,10 +1,12 @@ # ############################################################################################################################################ # ROCProfiler General Requirements # ############################################################################################################################################ -find_package( - Python3 - COMPONENTS Interpreter - REQUIRED) +if(NOT Python3_EXECUTABLE) + find_package( + Python3 + COMPONENTS Interpreter + REQUIRED) +endif() execute_process( COMMAND ${Python3_EXECUTABLE} -c "import lxml" diff --git a/projects/rocprofiler/tests-v2/featuretests/profiler/CMakeLists.txt b/projects/rocprofiler/tests-v2/featuretests/profiler/CMakeLists.txt index 168fc9e3e1..0a5eb88339 100644 --- a/projects/rocprofiler/tests-v2/featuretests/profiler/CMakeLists.txt +++ b/projects/rocprofiler/tests-v2/featuretests/profiler/CMakeLists.txt @@ -421,10 +421,12 @@ install( ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/tests/featuretests/profiler/apps/goldentraces COMPONENT tests) -find_package( - Python3 - COMPONENTS Interpreter - REQUIRED) +if(NOT Python3_EXECUTABLE) + find_package( + Python3 + COMPONENTS Interpreter + REQUIRED) +endif() execute_process( COMMAND ${Python3_EXECUTABLE} -c "import pandas" diff --git a/projects/rocprofiler/tests-v2/featuretests/tracer/CMakeLists.txt b/projects/rocprofiler/tests-v2/featuretests/tracer/CMakeLists.txt index af7d9602e6..53c46cfecf 100644 --- a/projects/rocprofiler/tests-v2/featuretests/tracer/CMakeLists.txt +++ b/projects/rocprofiler/tests-v2/featuretests/tracer/CMakeLists.txt @@ -130,10 +130,12 @@ install( ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/tests/featuretests/tracer/apps/goldentraces COMPONENT tests) -find_package( - Python3 - COMPONENTS Interpreter - REQUIRED) +if(NOT Python3_EXECUTABLE) + find_package( + Python3 + COMPONENTS Interpreter + REQUIRED) +endif() # cmake based tests include(${CMAKE_CURRENT_LIST_DIR}/hiptrace_validation_tests.cmake)