cmake: Misc. cleanups of how BOARD_ROOT and BOARD_DIR are used

Misc. refactorings that clean up how BOARD_ROOT and BOARD_DIR are
used.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
Sebastian Bøe 2018-09-27 17:15:24 +02:00 committed by Anas Nashif
commit fd8022ae16
3 changed files with 8 additions and 6 deletions

View file

@ -3,8 +3,10 @@
if(EXISTS ${BOARD_DIR}/CMakeLists.txt)
if(BOARD_ROOT)
add_subdirectory(${BOARD_DIR} boards/${ARCH}/${BOARD})
set(build_dir boards/${ARCH}/${BOARD})
else()
add_subdirectory(${BOARD_DIR})
unset(build_dir)
endif()
add_subdirectory(${BOARD_DIR} ${build_dir})
endif()