platforms/nuttx: init.cmake skip config lines with empty values

This commit is contained in:
Daniel Agar
2020-07-06 10:26:46 -04:00
parent b277840233
commit 0f0706be91
+8 -6
View File
@@ -153,15 +153,17 @@ foreach(NameAndValue ${ConfigContents})
# Find variable name
string(REGEX MATCH "^CONFIG[^=]+" Name ${NameAndValue})
if (Name)
if(Name)
# Find the value
string(REPLACE "${Name}=" "" Value ${NameAndValue})
# remove extra quotes
string(REPLACE "\"" "" Value ${Value})
if(Value)
# remove extra quotes
string(REPLACE "\"" "" Value ${Value})
# Set the variable
#message(STATUS "${Name} ${Value}")
set(${Name} ${Value} CACHE INTERNAL "NUTTX DEFCONFIG: ${Name}" FORCE)
# Set the variable
#message(STATUS "${Name} ${Value}")
set(${Name} ${Value} CACHE INTERNAL "NUTTX DEFCONFIG: ${Name}" FORCE)
endif()
endif()
endforeach()