From 642eb31c57fc9bd3cc797b04bc4d5f0adf6cc1b2 Mon Sep 17 00:00:00 2001 From: Leonid Pospelov Date: Sun, 21 Apr 2024 23:00:33 +0500 Subject: [PATCH] internal: add NO_CLEAN_AFTER_BUILD CMake option (#1939) --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 841a02b017..e15055d864 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,9 @@ endif() set(VCPKG_OVERLAY_TRIPLETS "${CMAKE_CURRENT_LIST_DIR}/overlay_triplets") set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/overlay_ports") -if("$ENV{CI}" STREQUAL "true") +option(NO_CLEAN_AFTER_BUILD "Don't clean vcpkg temporary folders after build" OFF) + +if("$ENV{CI}" STREQUAL "true" OR NO_CLEAN_AFTER_BUILD) set(VCPKG_INSTALL_OPTIONS --no-print-usage) else() set(VCPKG_INSTALL_OPTIONS --no-print-usage --clean-after-build)