cmake: fix kconfig cache when setting to 0 or n
This commit is contained in:
parent
408c30de13
commit
5137ca1ccc
|
@ -73,12 +73,18 @@ if(EXISTS ${BOARD_DEFCONFIG})
|
|||
# Find the value
|
||||
string(REPLACE "${Name}=" "" Value ${NameAndValue})
|
||||
|
||||
if(Value)
|
||||
# remove extra quotes
|
||||
string(REPLACE "\"" "" Value ${Value})
|
||||
# remove extra quotes
|
||||
string(REPLACE "\"" "" Value ${Value})
|
||||
|
||||
# Set the variable
|
||||
set(${Name} ${Value} CACHE INTERNAL "BOARD DEFCONFIG: ${Name}" FORCE)
|
||||
# Set the variable
|
||||
set(${Name} ${Value} CACHE INTERNAL "BOARD DEFCONFIG: ${Name}" FORCE)
|
||||
|
||||
else()
|
||||
# Find boolean not set
|
||||
string(REGEX MATCH " (CONFIG[^ ]+) is not set" Name ${NameAndValue})
|
||||
|
||||
if(${CMAKE_MATCH_1})
|
||||
set(${CMAKE_MATCH_1} "" CACHE INTERNAL "BOARD DEFCONFIG: ${CMAKE_MATCH_1}" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue