From ea8ea35f4e61ca90f5c8bec43e506ee77b9b57a7 Mon Sep 17 00:00:00 2001 From: Juan Ramos Date: Mon, 26 Jun 2023 12:53:10 -0600 Subject: cmake: Update update_deps --- scripts/CMakeLists.txt | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'scripts/CMakeLists.txt') diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 74545673..ad467ae0 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -28,15 +28,9 @@ if (UPDATE_DEPS) list(APPEND update_dep_command "${CMAKE_GENERATOR}") if (CMAKE_GENERATOR_PLATFORM) - set(_target_arch ${CMAKE_GENERATOR_PLATFORM}) - else() - if (MSVC_IDE) - message(WARNING "CMAKE_GENERATOR_PLATFORM not set. Using x64 as target architecture.") - endif() - set(_target_arch x64) + list(APPEND update_dep_command "--arch") + list(APPEND update_dep_command "${CMAKE_GENERATOR_PLATFORM}") endif() - list(APPEND update_dep_command "--arch") - list(APPEND update_dep_command "${_target_arch}") if (NOT CMAKE_BUILD_TYPE) message(WARNING "CMAKE_BUILD_TYPE not set. Using Debug for dependency build type") @@ -88,12 +82,16 @@ if (UPDATE_DEPS) set(UPDATE_DEPS_HASH "0" CACHE STRING "Default value until we run update_deps.py") mark_as_advanced(UPDATE_DEPS_HASH) + if ("${UPDATE_DEPS_HASH}" STREQUAL "0") + list(APPEND update_dep_command "--clean-build") + list(APPEND update_dep_command "--clean-install") + endif() + if ("${md5_hash}" STREQUAL $CACHE{UPDATE_DEPS_HASH}) message(DEBUG "update_deps.py: no work to do.") else() execute_process( COMMAND ${Python3_EXECUTABLE} ${update_dep_command} - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} RESULT_VARIABLE _update_deps_result ) if (NOT (${_update_deps_result} EQUAL 0)) -- cgit v1.2.3