From bbe79a1d7bb64ffb6cf8f8350293f1b969245c2b Mon Sep 17 00:00:00 2001 From: Alberto Miranda Date: Sun, 19 Feb 2023 07:27:17 +0100 Subject: [PATCH] Ensure the virtual environment is removed when make/ninja clean --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9051ecb..6be4e23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,12 @@ if(NOT TARGET genopts_virtualenv) DEPENDS ${GENOPTS_VIRTUALENV} DEPENDS ${CMAKE_CURRENT_LIST_DIR}/requirements.txt ) + + # Ensure the virtual environment is removed when cleaning + set_property( + TARGET genopts_virtualenv + APPEND + PROPERTY ADDITIONAL_CLEAN_FILES ${GENOPTS_VIRTUALENV}) endif() # Export a target with the location of the script in case someone needs this -- GitLab