lib: libc: Clean up CMake script to use add_subdirectory_ifdef

This commit cleans up the top `CMakeLists.txt` for the libc directory
to use `add_subdirectory_ifdef` in order to make the code more
readable.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
This commit is contained in:
Stephanos Ioannidis 2022-12-07 18:10:16 +09:00 committed by Christopher Friedt
parent 2c162449eb
commit c3db8dc9e7

View file

@ -1,13 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
if(CONFIG_NEWLIB_LIBC) add_subdirectory_ifdef(CONFIG_ARCMWDT_LIBC arcmwdt)
add_subdirectory(newlib) add_subdirectory_ifdef(CONFIG_ARMCLANG_STD_LIBC armstdc)
elseif(CONFIG_ARCMWDT_LIBC) add_subdirectory_ifdef(CONFIG_MINIMAL_LIBC minimal)
add_subdirectory(arcmwdt) add_subdirectory_ifdef(CONFIG_NEWLIB_LIBC newlib)
elseif(CONFIG_MINIMAL_LIBC) add_subdirectory_ifdef(CONFIG_PICOLIBC picolibc)
add_subdirectory(minimal)
elseif(CONFIG_ARMCLANG_STD_LIBC)
add_subdirectory(armstdc)
elseif(CONFIG_PICOLIBC)
add_subdirectory(picolibc)
endif()