From 657287e774c6d7f740bedbcbd9846de473dd1b18 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Tue, 29 Oct 2024 10:15:21 +0800 Subject: format cmake files (#5406) * format cmake files * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --- cmake/FetchedSharedLibrary.cmake | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'cmake/FetchedSharedLibrary.cmake') diff --git a/cmake/FetchedSharedLibrary.cmake b/cmake/FetchedSharedLibrary.cmake index 3c7f24be5..fa0bd9f5e 100644 --- a/cmake/FetchedSharedLibrary.cmake +++ b/cmake/FetchedSharedLibrary.cmake @@ -9,23 +9,24 @@ function(download_and_extract archive_name url) set(archive_path ${url}) else() message(STATUS "Fetching ${archive_name} from ${url}") - file(DOWNLOAD ${url} ${archive_path} - # SHOW_PROGRESS - STATUS status + file( + DOWNLOAD ${url} ${archive_path} + # SHOW_PROGRESS + STATUS status ) list(GET status 0 status_code) list(GET status 1 status_string) if(NOT status_code EQUAL 0) - message(WARNING "Failed to download ${archive_name} from ${url}: ${status_string}") + message( + WARNING + "Failed to download ${archive_name} from ${url}: ${status_string}" + ) return() endif() endif() - file(ARCHIVE_EXTRACT - INPUT ${archive_path} - DESTINATION ${extract_dir} - ) + file(ARCHIVE_EXTRACT INPUT ${archive_path} DESTINATION ${extract_dir}) set(${archive_name}_SOURCE_DIR ${extract_dir} PARENT_SCOPE) message(STATUS "${archive_name} downloaded and extracted to ${extract_dir}") @@ -51,10 +52,7 @@ function(copy_fetched_shared_library library_name url) ) macro(from_glob dir) # A little helper function - file( - GLOB_RECURSE source_object - "${dir}/${shared_library_filename}" - ) + file(GLOB_RECURSE source_object "${dir}/${shared_library_filename}") list(LENGTH source_object nmatches) if(nmatches EQUAL 0) message( @@ -88,7 +86,10 @@ function(copy_fetched_shared_library library_name url) elseif(ARG_IGNORE_FAILURE) return() else() - message(SEND_ERROR "Unable to download and extract ${library_name} from ${url}") + message( + SEND_ERROR + "Unable to download and extract ${library_name} from ${url}" + ) return() endif() endif() -- cgit v1.2.3