mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 01:11:10 +03:00
c++ examples: cmake now honors MODULE_LIST
If MODULE_LIST is set, cmake will only create examples that can be built with avaialble modules. There has been significant change to cmake file. Comments show you how to add new examples. Signed-off-by: Henry Bruce <henry.bruce@intel.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
a96a2ff44c
commit
01700b0d49
@ -202,7 +202,12 @@ macro(upm_module_init)
|
||||
endif()
|
||||
endmacro(upm_module_init)
|
||||
|
||||
subdirlist(SUBDIRS ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
if (MODULE_LIST)
|
||||
set(SUBDIRS ${MODULE_LIST})
|
||||
set(SUBDIRS ${SUBDIRS} upm)
|
||||
else()
|
||||
subdirlist(SUBDIRS ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
foreach(subdir ${SUBDIRS})
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/CMakeLists.txt)
|
||||
add_subdirectory(${subdir})
|
||||
|
Reference in New Issue
Block a user