Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton3 committed Dec 12, 2024
1 parent f6b25e4 commit c872c8a
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions cmake/DownloadUserver.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@ include_guard(GLOBAL)
function(download_userver)
set(OPTIONS)
set(ONE_VALUE_ARGS TRY_DIR)
set(MULTI_VALUE_ARGS OPTIONS)
set(MULTI_VALUE_ARGS)
cmake_parse_arguments(
ARG "${OPTIONS}" "${ONE_VALUE_ARGS}" "${MULTI_VALUE_ARGS}" ${ARGN}
)

if(ARG_TRY_DIR AND EXISTS "${ARG_TRY_DIR}")
foreach(OPTION IN LIST ARG_OPTIONS)
separate_arguments(OPTION)
list(GET OPTION 0 KEY)
list(GET OPTION 1 VALUE)
set("${KEY}" "${VALUE}" CACHE STRING "" FORCE)
endforeach()

message(STATUS "Using userver from ${ARG_TRY_DIR}")
add_subdirectory("${ARG_TRY_DIR}")
return()
Expand All @@ -25,6 +18,5 @@ function(download_userver)
CPMAddPackage(
NAME userver
${ARG_UNPARSED_ARGUMENTS}
OPTIONS ${OPTIONS}
)
endfunction()

0 comments on commit c872c8a

Please sign in to comment.