diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-05-28 13:02:09 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-10-15 18:22:20 +0200 |
commit | eab56607bbed89e694319ad9470338fd2eaf875b (patch) | |
tree | bff00d31722860997f1d5b2f61d1a621a86617c8 /cmake/common.cmake | |
parent | 6873aa786bf28bedab6c66e39012a6a1faa06550 (diff) |
Fix:use first optional argument in adding subdir macro
Change-Id: Id09128836df86ade96036359e125e4ce4f23a124
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/common.cmake')
-rw-r--r-- | cmake/common.cmake | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmake/common.cmake b/cmake/common.cmake index a78d246..9904692 100644 --- a/cmake/common.cmake +++ b/cmake/common.cmake @@ -253,11 +253,13 @@ macro(project_package_build) endmacro(project_package_build) macro(project_subdirs_add) - if(${ARGV0}) + set (ARGSLIST ${ARGN}) + list(LENGTH ARGSLIST ARGSNUM) + if(${ARGSNUM} GREATER 0) file(GLOB filelist "${ARGV0}") else() - file(GLOB filelist "*") - endif(${ARGV0}) + file(GLOB filelist "*") + endif() foreach(filename ${filelist}) if(EXISTS "${filename}/CMakeLists.txt") |