From aca95d1743c243dd0dd0c8b924608bc915ce1ae7 Mon Sep 17 00:00:00 2001 From: Torre Zuk <42548444+TorreZuk@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:55:46 -0600 Subject: [PATCH] use venv for Tensile create on Linux (#2022) (#2025) * use venv if vars set TensileCreateLibraryFiles on Linux to match Windows (cherry picked from commit 7dbd7234068a3ee82b86b4571da5f3d0e3629707) --- Tensile/cmake/TensileConfig.cmake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Tensile/cmake/TensileConfig.cmake b/Tensile/cmake/TensileConfig.cmake index 5b2bcfeab..38ce243e1 100644 --- a/Tensile/cmake/TensileConfig.cmake +++ b/Tensile/cmake/TensileConfig.cmake @@ -210,10 +210,9 @@ function(TensileCreateLibraryFiles set(Options ${Options} "--architecture=${archString}") endif() - if (WIN32) - set(CommandLine ${VIRTUALENV_BIN_DIR}/${VIRTUALENV_PYTHON_EXENAME} ${Script} ${Options} ${Tensile_LOGIC_PATH} ${Tensile_OUTPUT_PATH} HIP) - else() - set(CommandLine ${Script} ${Options} ${Tensile_LOGIC_PATH} ${Tensile_OUTPUT_PATH} HIP) + set(CommandLine ${Script} ${Options} ${Tensile_LOGIC_PATH} ${Tensile_OUTPUT_PATH} HIP) + if (WIN32 OR (VIRTUALENV_BIN_DIR AND VIRTUALENV_PYTHON_EXENAME)) + set(CommandLine ${VIRTUALENV_BIN_DIR}/${VIRTUALENV_PYTHON_EXENAME} ${CommandLine}) endif() message(STATUS "Tensile_CREATE_COMMAND: ${CommandLine}")