summaryrefslogtreecommitdiffstats
path: root/Tests/FindPython
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2020-02-10 10:18:43 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2020-02-10 11:41:04 (GMT)
commit3dab4682f6531343448f290976628e571a35dafd (patch)
treecda7e0e52f6be683d04ae663498f7669f20d348b /Tests/FindPython
parentad17c37d345cd143a131e4b5f26196e0e749ec0e (diff)
downloadCMake-3dab4682f6531343448f290976628e571a35dafd.zip
CMake-3dab4682f6531343448f290976628e571a35dafd.tar.gz
CMake-3dab4682f6531343448f290976628e571a35dafd.tar.bz2
FindPython: reduces consumption of resources
Stores more information in the cache to reduce the number of sub-processes required on subsequent find_package calls. Fixes: #20337
Diffstat (limited to 'Tests/FindPython')
-rw-r--r--Tests/FindPython/VirtualEnv/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/FindPython/VirtualEnv/CMakeLists.txt b/Tests/FindPython/VirtualEnv/CMakeLists.txt
index 9e8c673..045a3f2 100644
--- a/Tests/FindPython/VirtualEnv/CMakeLists.txt
+++ b/Tests/FindPython/VirtualEnv/CMakeLists.txt
@@ -10,6 +10,7 @@ if (NOT Python3_FOUND)
endif()
set (Python3_VIRTUAL_ENV "${CMAKE_CURRENT_BINARY_DIR}/py3venv")
+file (REMOVE_RECURSE "${CMAKE_CURRENT_BINARY_DIR}/py3venv")
execute_process (COMMAND "${Python3_EXECUTABLE}" -m venv "${Python3_VIRTUAL_ENV}"
RESULT_VARIABLE result