Beautify cmake files.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2026-03-07 13:30:37 +01:00
parent 6c7b254183
commit 4c88d712b4
7 changed files with 245 additions and 189 deletions

View File

@@ -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()