diff --git a/esma_add_subdirectories.cmake b/esma_add_subdirectories.cmake index 80a4eda..69bc4f6 100644 --- a/esma_add_subdirectories.cmake +++ b/esma_add_subdirectories.cmake @@ -1,6 +1,6 @@ # Only add the directories in alldirs list that actually exist. GEOS # can build in multiple configurations, and the build system must be -# able to skip non-existent directiories in the list. +# able to skip non-existent directories in the list. # We allow nested repositories to have leading or trailing "@" in their # name which is disregarded for everything except path. @@ -21,20 +21,23 @@ function (esma_add_subdirectory dir) set (${ARGS_FOUND} TRUE PARENT_SCOPE) endif() return() - else () - if (ARGS_FOUND) - set (${ARGS_FOUND} FALSE PARENT_SCOPE) - else () - ecbuild_warn(" directory not found ${dir}") - endif() - endif () + endif() endforeach() + # dir not found + if (ARGS_FOUND) + set (${ARGS_FOUND} FALSE PARENT_SCOPE) + else () + # The below should be changed to ecbuild_error() once the FOUND option + # is propagated through client code. + ecbuild_info(" directory not found ${dir} (possibly sparse checkout)") + endif() + endfunction (esma_add_subdirectory) function (esma_add_subdirectories dirs) set (dirs_ ${dirs} ${ARGN}) - ecbuild_info ("esma_add_subdirectiories: ${dirs}") + ecbuild_debug ("esma_add_subdirectories: ${dirs}") foreach (subdir ${dirs_}) esma_add_subdirectory(${subdir}) endforeach()