>> >> macro(ADD_SUBDIRECTORIES dirlist) >> >> set(prefix " + ") >> >> MESSAGE(STATUS "add_subdirectories: ${ARGN}") >> >> foreach(subdir ${dirlist}) >> >> MESSAGE(STATUS "${prefix}${subdir}") >> >> add_subdirectory(${subdir}) >> >> endforeach(subdir ${dirlist}) >> >> endmacro(ADD_SUBDIRECTORIES) >> >> >> >> using this gets: >> >> >> >> ... >> >> -- Scanning for sub projects in extra: >> >> -- Adding est;boost;threadpool >> >> -- add_subdirectories: boost;threadpool >> >> -- + est >> >> ... > > > > The macro has one argument "dirlist" which gets the first argument: est. > > The remaining arguments go into ARGN. You are iterating over the first > > argument only.
Thanks, I changed to: macro(ADD_SUBDIRECTORIES) set(prefix " + ") MESSAGE(STATUS "add_subdirectories: ${ARGN}") foreach(subdir ${ARGN}) MESSAGE(STATUS "${prefix}${subdir}") add_subdirectory(${subdir}) endforeach(subdir ${ARGN}) endmacro(ADD_SUBDIRECTORIES) and got: -- Scanning for sub projects in extra: -- Adding est;boost;threadpool -- add_subdirectories: est;boost;threadpool -- + est -- + boost -- Scanning ... The last is missing, why? Thanks, Olaf _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake