cmake: build modules under /modules

As we start adding more modules, all of them end up in
${CMAKE_BINARY_DIR}/ and this is getting too busy. We have a module
directory created for each module and the interesting build data is
getting lost in the crowd.

Move all module into ${CMAKE_BINARY_DIR}/modules to and keep them under
one directory.

Future enhancement: maintain the same structure of the modules as
checked out by west.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2019-05-28 14:34:21 -04:00
commit 3c2e43a19f

View file

@ -430,7 +430,7 @@ if(EXISTS ${CMAKE_BINARY_DIR}/zephyr_modules.txt)
string(REGEX REPLACE "\"(.*)\":\".*\"" "\\1" module_name ${module})
string(REGEX REPLACE "\".*\":\"(.*)\"" "\\1" module_path ${module})
message("Including module: ${module_name} in path: ${module_path}")
add_subdirectory(${module_path} ${CMAKE_BINARY_DIR}/${module_name})
add_subdirectory(${module_path} ${CMAKE_BINARY_DIR}/modules/${module_name})
endforeach()
endif()