cmake: extensions: Move ifndef functions to correct location

This commit moves the '_ifndef' functions that are implemented in the
"3.1. *_ifdef" section to the "3.2. *_ifndef" section.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
Stephanos Ioannidis 2021-08-18 23:07:51 +09:00 committed by Anas Nashif
commit 877239abfe

View file

@ -1393,24 +1393,12 @@ function(zephyr_library_sources_ifdef feature_toggle source)
endif() endif()
endfunction() endfunction()
function(zephyr_library_sources_ifndef feature_toggle source)
if(NOT ${feature_toggle})
zephyr_library_sources(${source} ${ARGN})
endif()
endfunction()
function(zephyr_sources_ifdef feature_toggle) function(zephyr_sources_ifdef feature_toggle)
if(${${feature_toggle}}) if(${${feature_toggle}})
zephyr_sources(${ARGN}) zephyr_sources(${ARGN})
endif() endif()
endfunction() endfunction()
function(zephyr_sources_ifndef feature_toggle)
if(NOT ${feature_toggle})
zephyr_sources(${ARGN})
endif()
endfunction()
function(zephyr_cc_option_ifdef feature_toggle) function(zephyr_cc_option_ifdef feature_toggle)
if(${${feature_toggle}}) if(${${feature_toggle}})
zephyr_cc_option(${ARGN}) zephyr_cc_option(${ARGN})
@ -1503,6 +1491,18 @@ function(target_cc_option_ifndef feature_toggle target scope option)
endif() endif()
endfunction() endfunction()
function(zephyr_library_sources_ifndef feature_toggle source)
if(NOT ${feature_toggle})
zephyr_library_sources(${source} ${ARGN})
endif()
endfunction()
function(zephyr_sources_ifndef feature_toggle)
if(NOT ${feature_toggle})
zephyr_sources(${ARGN})
endif()
endfunction()
function(zephyr_cc_option_ifndef feature_toggle) function(zephyr_cc_option_ifndef feature_toggle)
if(NOT ${feature_toggle}) if(NOT ${feature_toggle})
zephyr_cc_option(${ARGN}) zephyr_cc_option(${ARGN})