mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-28 17:11:23 +02:00
Beautify cmake files.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
function(dict command dict )
|
||||
function(dict command dict)
|
||||
if(command STREQUAL SET)
|
||||
set(arg_key ${ARGV2})
|
||||
set(arg_value ${ARGV3})
|
||||
@@ -10,7 +10,6 @@ function(dict command dict )
|
||||
|
||||
list(APPEND ${dict} "${arg_key}=${arg_value}")
|
||||
set(${dict} "${${dict}}" PARENT_SCOPE)
|
||||
|
||||
elseif(command STREQUAL GET)
|
||||
set(arg_key ${ARGV2})
|
||||
set(arg_outvar ${ARGV3})
|
||||
@@ -23,7 +22,6 @@ function(dict command dict )
|
||||
list(GET ${dict} ${idx} kv)
|
||||
string(REGEX REPLACE "^[^=]+=(.*)" "\\1" value "${kv}")
|
||||
set(${arg_outvar} "${value}" PARENT_SCOPE)
|
||||
|
||||
elseif(command STREQUAL _IDX)
|
||||
set(arg_key ${ARGV2})
|
||||
set(arg_outvar ${ARGV3})
|
||||
@@ -34,10 +32,9 @@ function(dict command dict )
|
||||
set(${arg_outvar} "${idx}" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
math(EXPR idx ${idx}+1)
|
||||
math(EXPR idx ${idx} + 1)
|
||||
endforeach()
|
||||
set(${arg_outvar} "-1" PARENT_SCOPE)
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "dict does not recognize sub-command ${command}")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user