From d50aa5f3ceeae1ed7c3ec8ec2e285aff3e32fbee Mon Sep 17 00:00:00 2001 From: Angad <66992519+ThirdEyeSqueegee@users.noreply.github.com> Date: Tue, 24 Oct 2023 19:59:14 -0700 Subject: [PATCH] chore: enable CPM build cache --- CommonLibSF/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CommonLibSF/CMakeLists.txt b/CommonLibSF/CMakeLists.txt index 18b0a678..7e02b872 100644 --- a/CommonLibSF/CMakeLists.txt +++ b/CommonLibSF/CMakeLists.txt @@ -38,6 +38,8 @@ if(USING_VCPKG) else() include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/CPM.cmake") + set(CPM_SOURCE_CACHE "${CMAKE_CURRENT_BINARY_DIR}/.cpm") + CPMAddPackage( GITHUB_REPOSITORY gabime/spdlog VERSION 1.12.0 @@ -213,3 +215,10 @@ install( include/SFSE DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) + +if(NOT USING_VCPKG) +set_property( + TARGET ${PROJECT_NAME} + APPEND PROPERTY ADDITIONAL_CLEAN_FILES ${CPM_SOURCE_CACHE} ${CMAKE_CURRENT_BINARY_DIR}/_deps +) +endif()